1. 13 11月, 2018 9 次提交
  2. 12 11月, 2018 15 次提交
  3. 10 11月, 2018 4 次提交
  4. 09 11月, 2018 4 次提交
    • P
      Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging · 160e5c22
      Peter Maydell 提交于
      Fixes a potential use-after-free issue that could be triggered by a
      misbehaving guest.
      
      # gpg: Signature made Thu 08 Nov 2018 20:36:48 GMT
      # gpg:                using RSA key 71D4D5E5822F73D6
      # gpg: Good signature from "Greg Kurz <groug@kaod.org>"
      # gpg:                 aka "Gregory Kurz <gregory.kurz@free.fr>"
      # gpg:                 aka "[jpeg image of size 3330]"
      # Primary key fingerprint: B482 8BAF 9431 40CE F2A3  4910 71D4 D5E5 822F 73D6
      
      * remotes/gkurz/tags/for-upstream:
        9p: write lock path in v9fs_co_open2()
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      160e5c22
    • G
      9p: write lock path in v9fs_co_open2() · 5b76ef50
      Greg Kurz 提交于
      The assumption that the fid cannot be used by any other operation is
      wrong. At least, nothing prevents a misbehaving client to create a
      file with a given fid, and to pass this fid to some other operation
      at the same time (ie, without waiting for the response to the creation
      request). The call to v9fs_path_copy() performed by the worker thread
      after the file was created can race with any access to the fid path
      performed by some other thread. This causes use-after-free issues that
      can be detected by ASAN with a custom 9p client.
      
      Unlike other operations that only read the fid path, v9fs_co_open2()
      does modify it. It should hence take the write lock.
      
      Cc: P J P <ppandit@redhat.com>
      Reported-by: Nzhibin hu <noirfate@gmail.com>
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      5b76ef50
    • P
      Merge remote-tracking branch 'remotes/riscv/tags/riscv-for-master-3.1-rc1' into staging · d3c2bbb1
      Peter Maydell 提交于
      A Single RISC-V Patch for 3.1-rc1
      
      This tag contains a single patch that I'd like to target for rc1: a fix
      for a memory leak that was detected by static code analysis.
      
      There are still three patch sets that I'd like to try to get up for 3.1:
      
      * The patch set Basian just published that contains fixes for a pair of
        issues he found when converting our port to decodetree.
      * An as-of-yet-unwritten fix to the third issue that Basian pointed out.
      * A fix to our fflags bug, which is currently coupled to some CSR
        refactoring that I don't think is OK for 3.1.
      
      I'm at Plumbers next week (and I think Alistair is there too?), but I'll
      try to find a way to squeeze in as much as possible.
      
      # gpg: Signature made Thu 08 Nov 2018 16:50:27 GMT
      # gpg:                using RSA key EF4CA1502CCBAB41
      # gpg: Good signature from "Palmer Dabbelt <palmer@dabbelt.com>"
      # gpg:                 aka "Palmer Dabbelt <palmer@sifive.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: 00CE 76D1 8349 60DF CE88  6DF8 EF4C A150 2CCB AB41
      
      * remotes/riscv/tags/riscv-for-master-3.1-rc1:
        riscv: spike: Fix memory leak in the board init
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      d3c2bbb1
    • A
      riscv: spike: Fix memory leak in the board init · 00a014ac
      Alistair Francis 提交于
      Coverity caught a malloc() call that was never freed. This patch ensures
      that we free the memory but also updates the allocation to use
      g_strdup_printf() instead of malloc().
      Signed-off-by: NAlistair Francis <alistair.francis@wdc.com>
      Suggested-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPalmer Dabbelt <palmer@sifive.com>
      Signed-off-by: NPalmer Dabbelt <palmer@sifive.com>
      00a014ac
  5. 08 11月, 2018 8 次提交
    • P
      tcg/tcg-op.h: Add multiple include guard · a7ce790a
      Peter Maydell 提交于
      The tcg-op.h header was missing the usual guard against multiple
      inclusion; add it.
      
      (Spotted by lgtm.com's static analyzer.)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Tested-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-id: 20181108125256.30986-1-peter.maydell@linaro.org
      a7ce790a
    • P
      Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.1-20181108' into staging · 7360be89
      Peter Maydell 提交于
      ppc patch queue 2018-11-08
      
      Here's another patch of accumulated ppc patches for qemu-3.1.
      Highlights are:
        * Support for nested HV KVM on POWER9 hosts
        * Remove Alex Graf as ppc maintainer
        * Emulation of external PID instructions
      
      # gpg: Signature made Thu 08 Nov 2018 12:14:27 GMT
      # gpg:                using RSA key 6C38CACA20D9B392
      # 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-3.1-20181108: (22 commits)
        ppc/spapr_caps: Add SPAPR_CAP_NESTED_KVM_HV
        target/ppc: Add one reg id for ptcr
        This patch fixes processing of rfi instructions in icount mode.
        hw/ppc/ppc440_uc: Remove dead code in sdram_size()
        MAINTAINERS: PPC: Remove myself
        ppc/pnv: check size before data buffer access
        target/ppc: fix mtmsr instruction for icount
        hw/ppc/mac_newworld: Free openpic_irqs array after use
        macio/pmu: Fix missing vmsd terminator
        spapr_pci: convert g_malloc() to g_new()
        target/ppc: Split out float_invalid_cvt
        target/ppc: Split out float_invalid_op_div
        target/ppc: Split out float_invalid_op_mul
        target/ppc: Split out float_invalid_op_addsub
        target/ppc: Introduce fp number classification
        target/ppc: Remove float_check_status
        target/ppc: Split up float_invalid_op_excp
        hw/ppc/spapr_rng: Introduce CONFIG_SPAPR_RNG switch for spapr_rng.c
        PPC: e500: convert SysBus init method to a realize method
        ppc4xx_pci: convert SysBus init method to a realize method
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7360be89
    • P
      replay: Exit on errors reading from replay log · 0b570077
      Peter Maydell 提交于
      Currently replay_get_byte() does not check for an error
      from getc(). Coverity points out (CID 1390622) that this
      could result in unexpected behaviour (such as looping
      forever, if we use the replay_get_dword() return value
      for a loop count). We don't expect reads from the replay
      log to fail, and if they do there is no way we can
      continue. So make them fatal errors.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
      Message-id: 20181106153330.5139-1-peter.maydell@linaro.org
      0b570077
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · fa272574
      Peter Maydell 提交于
      * icount fix (Clement)
      * dumping fixes for non-volatile memory (Marc-André, myself)
      * x86 emulation fix (Rudolf)
      * recent Hyper-V CPUID flag (Vitaly)
      * Q35 doc fix (Daniel)
      * lsi fix (Prasad)
      * SCSI block limits emulation fixes (myself)
      * qemu_thread_atexit rework (Peter)
      * ivshmem memory leak fix (Igor)
      
      # gpg: Signature made Tue 06 Nov 2018 21:34:30 GMT
      # gpg:                using RSA key BFFBD25F78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * remotes/bonzini/tags/for-upstream:
        util/qemu-thread-posix: Fix qemu_thread_atexit* for OSX
        include/qemu/thread.h: Document qemu_thread_atexit* API
        scsi-generic: do not do VPD emulation for sense other than ILLEGAL_REQUEST
        scsi-generic: avoid invalid access to struct when emulating block limits
        scsi-generic: avoid out-of-bounds access to VPD page list
        scsi-generic: keep VPD page list sorted
        lsi53c895a: check message length value is valid
        scripts/dump-guest-memory: Synchronize with guest_phys_blocks_region_add
        memory-mapping: skip non-volatile memory regions in GuestPhysBlockList
        nvdimm: set non-volatile on the memory region
        memory: learn about non-volatile memory region
        target/i386: Clear RF on SYSCALL instruction
        MAINTAINERS: remove or downgrade myself to reviewer from some subsystems
        ivshmem: fix memory backend leak
        i386: clarify that the Q35 machine type implements a P35 chipset
        x86: hv_evmcs CPU flag support
        icount: fix deadlock when all cpus are sleeping
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      fa272574
    • S
      ppc/spapr_caps: Add SPAPR_CAP_NESTED_KVM_HV · b9a477b7
      Suraj Jitindar Singh 提交于
      Add the spapr cap SPAPR_CAP_NESTED_KVM_HV to be used to control the
      availability of nested kvm-hv to the level 1 (L1) guest.
      
      Assuming a hypervisor with support enabled an L1 guest can be allowed to
      use the kvm-hv module (and thus run it's own kvm-hv guests) by setting:
      -machine pseries,cap-nested-hv=true
      or disabled with:
      -machine pseries,cap-nested-hv=false
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      b9a477b7
    • S
      target/ppc: Add one reg id for ptcr · 56de52ca
      Suraj Jitindar Singh 提交于
      The ptcr (partition table control register) is used to store the address
      and size of the partition table. For nested kvm-hv we have a level 1
      guest register the location of it's partition table with the hypervisor.
      Thus to support migration we need to be able to read this out of kvm
      and restore it post migration.
      
      Add the one reg id for the ptcr.
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      56de52ca
    • M
      This patch fixes processing of rfi instructions in icount mode. · a59d628f
      Maria Klimushenkova 提交于
      In this mode writing to interrupt/peripheral state is controlled
      by can_do_io flag. This flag must be set explicitly before helper
      function invocation.
      Signed-off-by: NMaria Klimushenkova <maria.klimushenkova@ispras.ru>
      Signed-off-by: NPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
      Tested-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      a59d628f
    • P
      hw/ppc/ppc440_uc: Remove dead code in sdram_size() · 09a333ee
      Peter Maydell 提交于
      Coverity points out in CID 1390588 that the test for sh == 0
      in sdram_size() can never fire, because we calculate sh with
          sh = 1024 - ((bcr >> 6) & 0x3ff);
      which must result in a value between 1 and 1024 inclusive.
      
      Without the relevant manual for the SoC, we're not completely
      sure of the correct behaviour here, but we can remove the
      dead code without changing how QEMU currently behaves.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NLaurent Vivier <lvivier@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      09a333ee