1. 22 2月, 2020 34 次提交
  2. 21 2月, 2020 6 次提交
    • P
      Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.0-20200221' into staging · a8c6af67
      Peter Maydell 提交于
      ppc patch queue 2020-02-21
      
      Here's the next patch of ppc target patches.  Highlights are:
        * Some fixes for CAS / unplug interactions
        * Remove some leaks of device trees
        * Some fixes for the PHB3 and PHB4 devices
        * Support for NVDIMMs on the pseries machine type
        * Assorted other fixes and cleanups
      
      # gpg: Signature made Fri 21 Feb 2020 03:35:40 GMT
      # gpg:                using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full]
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full]
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full]
      # gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown]
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * remotes/dgibson/tags/ppc-for-5.0-20200221:
        hw/ppc/virtex_ml507:fix leak of fdevice tree blob
        spapr: Fix handling of unplugged devices during CAS and migration
        spapr: Don't use spapr_drc_needed() in CAS code
        ppc: free 'fdt' after reset the machine
        target/ppc/cpu.h: Clean up comments in the struct CPUPPCState definition
        target/ppc/cpu.h: Move fpu related members closer in cpu env
        target/ppc: Fix typo in comments
        spapr: Allow changing offset for -kernel image
        pnv/phb3: Add missing break statement
        pnv/phb4: Fix error path in pnv_pec_realize()
        pnv/phb3: Convert 1u to 1ull
        target/ppc/cpu.h: Remove duplicate includes
        spapr: Add Hcalls to support PAPR NVDIMM device
        spapr: Add NVDIMM device support
        nvdimm: add uuid property to nvdimm
        mem: move nvdimm_device_list to utilities
        ppc: function to setup latest class options
        ppc/pnv: Fix PCI_EXPRESS dependency
        qtest: Fix rtas dependencies
        spapr/rtas: Print message from "ibm,os-term"
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a8c6af67
    • P
      Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-02-20' into staging · 9e6b7f7e
      Peter Maydell 提交于
      Block patches:
      - qemu-img convert: New --target-is-zero parameter
      - qcow2: Specify non-default compression type flag
      - optionally flat output for query-named-block-nodes
      - some fixes
      - pseudo-creation of images on block devices is now done by a generic
        block layer function
      
      # gpg: Signature made Thu 20 Feb 2020 16:05:34 GMT
      # gpg:                using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40
      # gpg:                issuer "mreitz@redhat.com"
      # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full]
      # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40
      
      * remotes/maxreitz/tags/pull-block-2020-02-20:
        iotests: Test snapshot -l field separation
        block: Fix VM size field width in snapshot dump
        iotests: Test convert -n -B to backing-less target
        qemu-img: Fix convert -n -B for backing-less targets
        iotests: Add test for image creation fallback
        iscsi: Drop iscsi_co_create_opts()
        file-posix: Drop hdev_co_create_opts()
        block: Generic file creation fallback
        block/nbd: Fix hang in .bdrv_close()
        iotests/279: Fix for non-qcow2 formats
        block/backup-top: fix flags handling
        block: always fill entire LUKS header space with zeros
        qemu-img: Add --target-is-zero to convert
        qapi: Allow getting flat output from 'query-named-block-nodes'
        iotests/147: Fix drive parameters
        iotests: Remove the superfluous 2nd check for the availability of quorum
        docs: qcow2: introduce compression type feature
        docs: improve qcow2 spec about extending image header
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9e6b7f7e
    • C
      hw/ppc/virtex_ml507:fix leak of fdevice tree blob · 438bafca
      Chen Qun 提交于
      The device tree blob returned by load_device_tree is malloced.
      We should free it after cpu_physical_memory_write().
      Reported-by: NEuler Robot <euler.robot@huawei.com>
      Signed-off-by: NChen Qun <kuhn.chenqun@huawei.com>
      Message-Id: <20200218091154.21696-3-kuhn.chenqun@huawei.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      438bafca
    • G
      spapr: Fix handling of unplugged devices during CAS and migration · ab858434
      Greg Kurz 提交于
      We already detect if a device is being hot plugged before CAS to trigger
      a CAS reboot and during migration to migrate the state of the associated
      DRC. But hot unplugging a device is also an asynchronous operation that
      requires the guest to take action. This means that if the guest is migrated
      after the hot unplug event was sent but before it could release the device
      with RTAS, the destination QEMU doesn't know about the pending unplug
      operation and doesn't actually remove the device when the guest finally
      releases it.
      
      Similarly, if the unplug request is fired before CAS, the guest isn't
      notified of the change, just like with hotplug. It ends up booting with
      the device still present in the DT and configures it, just like it was
      never removed. Even weirder, since the event is still queued, it will
      be eventually processed when some other unrelated event is posted to
      the guest.
      
      Enhance spapr_drc_transient() to also return true if an unplug request is
      pending. This fixes the issue at CAS with a CAS reboot request and
      causes the DRC state to be migrated. Some extra care is still needed to
      inform the destination that an unplug request is pending : migrate the
      unplug_requested field of the DRC in an optional subsection. This might
      break backwards migration, but this is still better than ending with
      an inconsistent guest.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Message-Id: <158169248798.3465937.1108351365840514270.stgit@bahia.lan>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      ab858434
    • G
      spapr: Don't use spapr_drc_needed() in CAS code · 4b63db12
      Greg Kurz 提交于
      We currently don't support hotplug of devices between boot and CAS. If
      this happens a CAS reboot is triggered. We detect this during CAS using
      the spapr_drc_needed() function which is essentially a VMStateDescription
      .needed callback. Even if the condition for CAS reboot happens to be the
      same as for DRC migration, it looks wrong to piggyback a migration helper
      for this.
      
      Introduce a helper with slightly more explicit name and use it in both CAS
      and DRC migration code. Since a subsequent patch will enhance this helper
      to cover the case of hot unplug, let's go for spapr_drc_transient(). While
      here convert spapr_hotplugged_dev_before_cas() to the "transient" wording as
      well.
      
      This doesn't change any behaviour.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Message-Id: <158169248180.3465937.9531405453362718771.stgit@bahia.lan>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      4b63db12
    • P
      ppc: free 'fdt' after reset the machine · b2fb7a43
      Pan Nengyuan 提交于
      'fdt' forgot to clean both e500 and pnv when we call 'system_reset' on ppc,
      this patch fix it. The leak stacks are as follow:
      
      Direct leak of 4194304 byte(s) in 4 object(s) allocated from:
          #0 0x7fafe37dd970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970)
          #1 0x7fafe2e3149d in g_malloc0 (/lib64/libglib-2.0.so.0+0x5249d)
          #2 0x561876f7f80d in create_device_tree /mnt/sdb/qemu-new/qemu/device_tree.c:40
          #3 0x561876b7ac29 in ppce500_load_device_tree /mnt/sdb/qemu-new/qemu/hw/ppc/e500.c:364
          #4 0x561876b7f437 in ppce500_reset_device_tree /mnt/sdb/qemu-new/qemu/hw/ppc/e500.c:617
          #5 0x56187718b1ae in qemu_devices_reset /mnt/sdb/qemu-new/qemu/hw/core/reset.c:69
          #6 0x561876f6938d in qemu_system_reset /mnt/sdb/qemu-new/qemu/vl.c:1412
          #7 0x561876f6a25b in main_loop_should_exit /mnt/sdb/qemu-new/qemu/vl.c:1645
          #8 0x561876f6a398 in main_loop /mnt/sdb/qemu-new/qemu/vl.c:1679
          #9 0x561876f7da8e in main /mnt/sdb/qemu-new/qemu/vl.c:4438
          #10 0x7fafde16b812 in __libc_start_main ../csu/libc-start.c:308
          #11 0x5618765c055d in _start (/mnt/sdb/qemu-new/qemu/build/ppc64-softmmu/qemu-system-ppc64+0x2b1555d)
      
      Direct leak of 1048576 byte(s) in 1 object(s) allocated from:
          #0 0x7fc0a6f1b970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970)
          #1 0x7fc0a656f49d in g_malloc0 (/lib64/libglib-2.0.so.0+0x5249d)
          #2 0x55eb05acd2ca in pnv_dt_create /mnt/sdb/qemu-new/qemu/hw/ppc/pnv.c:507
          #3 0x55eb05ace5bf in pnv_reset /mnt/sdb/qemu-new/qemu/hw/ppc/pnv.c:578
          #4 0x55eb05f2f395 in qemu_system_reset /mnt/sdb/qemu-new/qemu/vl.c:1410
          #5 0x55eb05f43850 in main /mnt/sdb/qemu-new/qemu/vl.c:4403
          #6 0x7fc0a18a9812 in __libc_start_main ../csu/libc-start.c:308
          #7 0x55eb0558655d in _start (/mnt/sdb/qemu-new/qemu/build/ppc64-softmmu/qemu-system-ppc64+0x2b1555d)
      Reported-by: NEuler Robot <euler.robot@huawei.com>
      Signed-off-by: NPan Nengyuan <pannengyuan@huawei.com>
      Message-Id: <20200214033206.4395-1-pannengyuan@huawei.com>
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      b2fb7a43