1. 16 11月, 2017 2 次提交
    • S
      throttle-groups: forget timer and schedule next TGM on detach · 341e0b56
      Stefan Hajnoczi 提交于
      tg->any_timer_armed[] must be cleared when detaching pending timers from
      the AioContext.  Failure to do so leads to hung I/O because it looks
      like there are still timers pending when in fact they have been removed.
      
      Other ThrottleGroupMembers might have requests pending too so it's
      necessary to schedule the next TGM so it can set a timer.
      
      This patch fixes hung I/O when QEMU is launched with drives that are in
      the same throttling group:
      
        (guest)$ dd if=/dev/zero of=/dev/vdb oflag=direct bs=512 &
        (guest)$ dd if=/dev/zero of=/dev/vdc oflag=direct bs=512 &
        (qemu) stop
        (qemu) cont
        ...I/O is stuck...
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 20171116112150.27607-1-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      341e0b56
    • P
      Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2017-11-15-1' into staging · 8048082f
      Peter Maydell 提交于
      Merge tpm 2017/11/15 v1
      
      # gpg: Signature made Wed 15 Nov 2017 11:51:47 GMT
      # gpg:                using RSA key 0x75AD65802A0B4211
      # gpg: Good signature from "Stefan Berger <stefanb@linux.vnet.ibm.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: B818 B9CA DF90 89C2 D5CE  C66B 75AD 6580 2A0B 4211
      
      * remotes/stefanberger/tags/pull-tpm-2017-11-15-1:
        tpm_tis: Return 0 for every register in case of failure mode
        tpm_tis: Return TPM_VERSION_UNSPEC in case of BE failure
        tpm-emulator: protect concurrent ctrl_chr access
        specs: Extend TPM spec with TPM emulator description
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      8048082f
  2. 15 11月, 2017 28 次提交
  3. 14 11月, 2017 8 次提交
    • P
      Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.11-20171114' into staging · 0dc8874a
      Peter Maydell 提交于
      ppc patch queue for 2017-11-14
      
      Another couple of fixes for qemu-2.11.
      
      # gpg: Signature made Tue 14 Nov 2017 04:36:20 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-20171114:
        xics/kvm: synchonize state before 'info pic'
        target/ppc: correct htab shift for hash on radix
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      0dc8874a
    • G
      seabios: update to 1.11 final · 6350b2a0
      Gerd Hoffmann 提交于
      Update our pre-release seabios snapshot to the final release.
      
      git shortlog
      ============
      
      Gerd Hoffmann (1):
            sercon: Disable ScreenAndDebug in case both serial console and serial debug are active
      
      Kevin O'Connor (2):
            timer: Avoid integer overflows in usec and nsec calculations
            docs: Note v1.11.0 release
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      6350b2a0
    • P
      Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging · 98956063
      Peter Maydell 提交于
      # gpg: Signature made Tue 14 Nov 2017 02:05:34 GMT
      # gpg:                using RSA key 0xEF04965B398D6211
      # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211
      
      * remotes/jasowang/tags/net-pull-request:
        net/socket: fix coverity issue
        Add new PCI ID for i82559a
        Fix eepro100 simple transmission mode
        colo: Consolidate the duplicate code chunk into a routine
        colo-compare: Fix comments
        colo-compare: compare the packet in a specified Connection
        colo-compare: Insert packet into the suitable position of packet queue directly
        net: fix check for number of parameters to -netdev socket
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      98956063
    • P
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20171113' into staging · 55ed8d60
      Peter Maydell 提交于
      target-arm queue:
       * translate-a64.c: silence gcc5 warning
       * highbank: validate register offset before access
       * MAINTAINERS: Add entries for Smartfusion2
       * accel/tcg/translate-all: expand cpu_restore_state addr check
         (so usermode insn aborts don't crash with an assertion failure)
       * fix TCG initialization of some Arm boards by allowing them
         to specify min/default number of CPUs to create
      
      # gpg: Signature made Mon 13 Nov 2017 14:11:09 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-20171113:
        accel/tcg/translate-all: expand cpu_restore_state addr check
        hw: add .min_cpus and .default_cpus fields to machine_class
        xlnx-zcu102: Specify the max number of CPUs for the EP108
        xlnx-zcu102: Add an info message deprecating the EP108
        xlnx-zynqmp: Properly support the smp command line option
        qom: move CPUClass.tcg_initialize to a global
        MAINTAINERS: Add entries for Smartfusion2
        highbank: validate register offset before access
        arm/translate-a64: mark path as unreachable to eliminate warning
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      55ed8d60
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/ui-20171110-pull-request' into staging · 2e550e31
      Peter Maydell 提交于
      ui: fixes for 2.11
      
      # gpg: Signature made Fri 10 Nov 2017 14:02:23 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/ui-20171110-pull-request:
        ui: use QEMU_IS_ALIGNED macro
        ui: fix dcl unregister
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      2e550e31
    • G
      xics/kvm: synchonize state before 'info pic' · dcb556fc
      Greg Kurz 提交于
      When using the emulated XICS, the 'info pic' monitor command shows:
      
      CPU 0 XIRR=ff000000 ((nil)) PP=ff MFRR=ff
      ICS 1000..13ff 0x10040060340
        1000 MSI 05 00
        1001 MSI 05 00
        1002 MSI 05 00
        1003 MSI ff 00
        1004 LSI ff 00
        1005 LSI ff 00
        1006 LSI ff 00
        1007 LSI ff 00
        1008 MSI 05 00
        1009 MSI 05 00
        100a MSI 05 00
        100b MSI 05 00
        100c MSI 05 00
      
      but when using the in-kernel XICS with the very same guest, we get:
      
      CPU 0 XIRR=00000000 ((nil)) PP=ff MFRR=ff
      ICS 1000..13ff 0x10032e00340
        1000 MSI ff 00
        1001 MSI ff 00
        1002 MSI ff 00
        1003 MSI ff 00
        1004 LSI ff 00
        1005 LSI ff 00
        1006 LSI ff 00
        1007 LSI ff 00
        1008 MSI ff 00
        1009 MSI ff 00
        100a MSI ff 00
        100b MSI ff 00
        100c MSI ff 00
      
      ie, all irqs are masked and XIRR is null, while we should get the
      same output as with the emulated XICS.
      
      If the guest is then migrated, 'info pic' shows the expected values
      on both source and destination.
      
      The problem is that QEMU doesn't synchronize with KVM before printing
      the XICS state. Migration happens to fix the output because it enforces
      synchronization with KVM.
      
      To fix the invalid output of 'info pic', this patch introduces a new
      synchronize_state operation for both ICPStateClass and ICSStateClass.
      The ICP operation relies on run_on_cpu() in order to kick the vCPU
      and avoid sleeping on KVM_GET_ONE_REG.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      dcb556fc
    • S
      target/ppc: correct htab shift for hash on radix · e05fba50
      Sam Bobroff 提交于
      KVM HV will soon support running a guest in hash mode on a POWER9 host
      running in radix mode (see [1]), however the guest currently fails to
      boot.
      
      This is because the "htab_shift" value (the size of the MMU's hash
      table) is added to the device tree before KVM has had a chance to
      change it. If the host is in hash mode, KVM does not need to change it
      and so the problem is not seen, but when the host is in radix mode a
      change is required and we see a problem.
      
      To fix this, move the call spapr_setup_hpt_and_vrma() (where
      htab_shift could be changed) up a little so that it's called before
      spapr_h_cas_compose_response() (where htab_shift is added to the
      device tree).
      Signed-off-by: NSam Bobroff <sam.bobroff@au1.ibm.com>
      
      [1] See http://www.spinics.net/lists/kvm-ppc/msg13057.htmlSigned-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      e05fba50
    • P
      Merge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into staging · 02e5844d
      Peter Maydell 提交于
      # gpg: Signature made Fri 10 Nov 2017 13:41:01 GMT
      # gpg:                using RSA key 0xCA35624C6A9171C6
      # gpg: Good signature from "Fam Zheng <famz@redhat.com>"
      # Primary key fingerprint: 5003 7CB7 9706 0F76 F021  AD56 CA35 624C 6A91 71C6
      
      * remotes/famz/tags/docker-pull-request:
        docker: correctly escape $BACKEND in the help output
        docker: Improved image checksum
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      02e5844d
  4. 13 11月, 2017 2 次提交
    • A
      qemu-iotests: Test I/O limits with removable media · 07615626
      Alberto Garcia 提交于
      This test hotplugs a CD drive to a VM and checks that I/O limits can
      be set only when the drive has media inserted and that they are kept
      when the media is replaced.
      
      This also tests the removal of a device with valid I/O limits set but
      no media inserted. This involves deleting and disabling the limits
      of a BlockBackend without BlockDriverState, a scenario that has been
      crashing until the fixes from the last couple of patches.
      
      [Python PEP8 fixup: "Don't use spaces are the = sign when used to
      indicate a keyword argument or a default parameter value"
      --Stefan]
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Message-id: 071eb397118ed207c5a7f01d58766e415ee18d6a.1510339534.git.berto@igalia.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      07615626
    • A
      block: Leave valid throttle timers when removing a BDS from a backend · c89bcf3a
      Alberto Garcia 提交于
      If a BlockBackend has I/O limits set then its ThrottleGroupMember
      structure uses the AioContext from its attached BlockDriverState.
      Those two contexts must be kept in sync manually. This is not
      ideal and will be fixed in the future by removing the throttling
      configuration from the BlockBackend and storing it in an implicit
      filter node instead, but for now we have to live with this.
      
      When you remove the BlockDriverState from the backend then the
      throttle timers are destroyed. If a new BlockDriverState is later
      inserted then they are created again using the new AioContext.
      
      There are a couple of problems with this:
      
         a) The code manipulates the timers directly, leaving the
            ThrottleGroupMember.aio_context field in an inconsisent state.
      
         b) If you remove the I/O limits (e.g by destroying the backend)
            when the timers are gone then throttle_group_unregister_tgm()
            will attempt to destroy them again, crashing QEMU.
      
      While b) could be fixed easily by allowing the timers to be freed
      twice, this would result in a situation in which we can no longer
      guarantee that a valid ThrottleState has a valid AioContext and
      timers.
      
      This patch ensures that the timers and AioContext are always valid
      when I/O limits are set, regardless of whether the BlockBackend has a
      BlockDriverState inserted or not.
      
      [Fixed "There'a" typo as suggested by Max Reitz <mreitz@redhat.com>
      --Stefan]
      Reported-by: Nsochin jiang <sochin.jiang@huawei.com>
      Signed-off-by: NAlberto Garcia <berto@igalia.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Message-id: e089c66e7c20289b046d782cea4373b765c5bc1d.1510339534.git.berto@igalia.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      c89bcf3a