1. 17 2月, 2016 5 次提交
    • D
      migration: ensure htab_save_first completes after timeout · 378bc217
      David Gibson 提交于
      htab_save_first_pass could return without finishing its work due to
      timeout. The patch checks if another invocation of it is necessary and
      will call it in htab_save_complete if necessary.
      Signed-off-by: NJianjun Duan <duanj@linux.vnet.ibm.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      [removed overlong line]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      378bc217
    • D
      target-ppc: Remove hack for ppc_hash64_load_hpte*() with HV KVM · fa48b432
      David Gibson 提交于
      With HV KVM, the guest's hash page table (HPT) is managed by the kernel and
      not directly accessible to QEMU.  This means that spapr->htab is NULL
      and normally env->external_htab would also be NULL for each cpu.
      
      However, that would cause ppc_hash64_load_hpte*() to do the wrong thing in
      the few cases where QEMU does need to load entries from the in-kernel HPT.
      Specifically, seeing external_htab is NULL, they would look for an HPT
      within the guest's address space instead.
      
      To stop that we have an ugly hack in the pseries machine type code to
      set external htab to (void *)1 instead.
      
      This patch removes that hack by having ppc_hash64_load_hpte*() explicitly
      check kvmppc_kern_htab instead, which makes more sense.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      fa48b432
    • D
      pseries: Move hash page table allocation to reset time · c5f54f3e
      David Gibson 提交于
      At the moment the size of the hash page table (HPT) is fixed based on the
      maximum memory allowed to the guest.  As such, we allocate the table during
      machine construction, and just clear it at reset.
      
      However, we're planning to implement a PAPR extension allowing the hash
      page table to be resized at runtime.  This will mean that on reset we want
      to revert it to the default size.  It also means that when migrating, we
      need to make sure the destination allocates an HPT of size matching the
      host, since the guest could have changed it before the migration.
      
      This patch replaces the spapr_alloc_htab() and spapr_reset_htab() functions
      with a new spapr_reallocate_hpt() function.  This is called at reset and
      inbound migration only, not during machine init any more.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      c5f54f3e
    • D
      pseries: Add helper to calculate recommended hash page table size · 8dfe8e7f
      David Gibson 提交于
      At present we calculate the recommended hash page table (HPT) size for a
      pseries guest just once in ppc_spapr_init() before allocating the HPT.
      In future patches we're going to want this calculation in other places, so
      this splits it out into a helper function.  While we're at it, change the
      calculation to use ctz() instead of an explicit loop.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      8dfe8e7f
    • D
      pseries: Simplify handling of the hash page table fd · 715c5407
      David Gibson 提交于
      When migrating the 'pseries' machine type with KVM, we use a special fd
      to access the hash page table stored within KVM.  Usually, this fd is
      opened at the beginning of migration, and kept open until the migration
      is complete.
      
      However, if there is a guest reset during the migration, the fd can become
      stale and we need to re-open it.  At the moment we use an 'htab_fd_stale'
      flag in sPAPRMachineState to signal this, which is checked in the migration
      iterators.
      
      But that's rather ugly.  It's simpler to just close and invalidate the
      fd on reset, and lazily re-open it in migration if necessary.  This patch
      implements that change.
      
      This requires a small addition to the machine state's instance_init,
      so that htab_fd is initialized to -1 (telling the migration code it
      needs to open it) instead of 0, which could be a valid fd.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      715c5407
  2. 30 1月, 2016 8 次提交
  3. 29 1月, 2016 1 次提交
    • P
      ppc: Clean up includes · 0d75590d
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1453832250-766-6-git-send-email-peter.maydell@linaro.org
      0d75590d
  4. 13 1月, 2016 3 次提交
  5. 11 1月, 2016 12 次提交
  6. 30 11月, 2015 1 次提交
  7. 26 11月, 2015 1 次提交
  8. 11 11月, 2015 1 次提交
  9. 10 11月, 2015 1 次提交
  10. 30 10月, 2015 1 次提交
  11. 29 10月, 2015 1 次提交
  12. 23 10月, 2015 4 次提交
  13. 20 10月, 2015 1 次提交