1. 20 3月, 2014 2 次提交
  2. 14 3月, 2014 2 次提交
  3. 05 3月, 2014 4 次提交
  4. 11 2月, 2014 7 次提交
  5. 26 10月, 2013 1 次提交
  6. 03 9月, 2013 1 次提交
  7. 02 9月, 2013 1 次提交
  8. 29 7月, 2013 1 次提交
    • D
      pseries: savevm support for pseries machine · 4be21d56
      David Gibson 提交于
      This adds the necessary pieces to implement savevm / migration for the
      pseries machine.  The most complex part here is migrating the hash
      table - for the paravirtualized pseries machine the guest's hash page
      table is not stored within guest memory, but externally and the guest
      accesses it via hypercalls.
      
      This patch uses a hypervisor reserved bit of the HPTE as a dirty bit
      (tracking changes to the HPTE itself, not the page it references).
      This is used to implement a live migration style incremental save and
      restore of the hash table contents.
      
      Normally a hash table is 16MB but it can get bigger depending on how
      much RAM the guest has. Due to its nature, updates to it are random so
      the live migration style is used for it.
      
      In addition it adds VMStateDescription information to save and restore
      the (few) remaining pieces of state information needed by the pseries
      machine.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com>
      Message-id: 1374175984-8930-9-git-send-email-aliguori@us.ibm.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      4be21d56
  9. 12 7月, 2013 2 次提交
  10. 01 7月, 2013 1 次提交
    • A
      spapr-rtas: add CPU argument to RTAS calls · 210b580b
      Anthony Liguori 提交于
      RTAS is a hypervisor provided binary blob that a guest loads and
      calls into to execute certain functions.  It's similar to the
      vsyscall page in Linux or the short lived VMCI paravirt interface
      from VMware.
      
      The QEMU implementation of the RTAS blob is simply a passthrough
      that proxies all RTAS calls to the hypervisor via an hypercall.
      
      While we pass a CPU argument for hypercall handling in QEMU, we
      don't pass it for RTAS calls.  Since some RTAs calls require
      making hypercalls (normally RTAS is implemented as guest code) we
      have nasty hacks to allow that.
      
      Add a CPU argument to RTAS call handling so we can more easily
      invoke hypercalls just as guest code would.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      210b580b
  11. 18 5月, 2013 1 次提交
  12. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  13. 22 3月, 2013 2 次提交
    • D
      mmu-hash*: Add hash pte load/store helpers · dffdaf61
      David Gibson 提交于
      On real hardware the ppc hash page table is stored in memory; accordingly
      our mmu emulation code can read a hash page table in guest memory.  But,
      when paravirtualized under PAPR, the real hash page table is in host
      memory, accessible to the guest only via hypercalls.  We model this by
      also allowing the MMU emulation code to access a specially allocated hash
      page table outside the guest's memory image. At present these two options
      are implemented with some ugly conditionals at each access point in the mmu
      emulation code.  In the implementation of the PAPR hypercalls, we assume
      the external hash table.
      
      This patch cleans things up by adding helpers to load and store from the
      hash table for both 32-bit and 64-bit hash mmus.  The 64-bit versions
      handle both the in-guest-memory and outside guest memory cases.  The 32-bit
      versions only handle the in-guest-memory case since no 32-bit systems can
      have an external hash table at present.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      dffdaf61
    • D
      mmu-hash*: Add header file for definitions · d5aea6f3
      David Gibson 提交于
      Currently cpu.h contains a number of definitions relating to the 64-bit
      hash MMU.  Some are used in the MMU emulation code, but some are only used
      in the spapr MMU management hcall implementations.
      
      This patch moves these definitions (except for a few that are needed
      more widely) into mmu-hash64.h header, shared between the MMU emulation
      code and the spapr hcall code.  The MMU emulation code is also updated to
      actually use a number of those definitions in place of hard coded
      constants.
      
      Similarly, we add new analogous definitions to mmu-hash32.h and use those
      in place of many hard-coded constants in mmu-hash32.c
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      [agraf: fix 32-bit hosts]
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      d5aea6f3
  14. 12 3月, 2013 1 次提交
  15. 01 3月, 2013 1 次提交
  16. 16 2月, 2013 2 次提交
  17. 15 1月, 2013 1 次提交
    • A
      cpu: Move cpu_index field to CPUState · 55e5c285
      Andreas Färber 提交于
      Note that target-alpha accesses this field from TCG, now using a
      negative offset. Therefore the field is placed last in CPUState.
      
      Pass PowerPCCPU to [kvm]ppc_fixup_cpu() to facilitate this change.
      
      Move common parts of mips cpu_state_reset() to mips_cpu_reset().
      
      Acked-by: Richard Henderson <rth@twiddle.net> (for alpha)
      [AF: Rebased onto ppc CPU subclasses and openpic changes]
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      55e5c285
  18. 19 12月, 2012 2 次提交
  19. 31 10月, 2012 3 次提交
  20. 29 10月, 2012 2 次提交
    • D
      target-ppc: Rework storage of VPA registration state · 1bfb37d1
      David Gibson 提交于
      With PAPR guests, hypercalls allow registration of the Virtual Processor
      Area (VPA), SLB shadow and dispatch trace log (DTL), each of which allow
      for certain communication between the guest and hypervisor.  Currently, we
      store the addresses of the three areas and the size of the dtl in
      CPUPPCState.
      
      The SLB shadow and DTL are variable sized, with the size being retrieved
      from within the registered memory area at the hypercall time.  This size
      can later be overwritten with other information, however, so we need to
      save the size as of registration time.  We already do this for the DTL,
      but not for the SLB shadow, so this patch fixes that.
      
      In addition, we change the storage of the VPA information to use fixed
      size integer types which will make life easier for syncing this data with
      KVM, which we will need in future.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      1bfb37d1
    • D
      pseries: Don't allow duplicate registration of hcalls or RTAS calls · c89d5299
      David Gibson 提交于
      Currently the pseries machine code allows a callback to be registered
      for a hypercall number twice, as long as it's the same callback the second
      time.  We don't test for duplicate registrations of RTAS callbacks at all
      so it will effectively be last registratiojn wins.
      
      This was originally done because it was awkward to ensure that the
      registration happened exactly once, but the code has since been
      restructured so that's no longer the case.
      
      Duplicate registration of a hypercall or RTAS call could well suggest
      a duplicate initialization which could cause other problems, so this patch
      makes duplicate registrations a bug, to prevent the old behaviour from
      hiding other bugs.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      c89d5299
  21. 05 10月, 2012 1 次提交
    • D
      pseries: Don't test for MSR_PR for hypercalls under KVM · efcb9383
      David Gibson 提交于
      PAPR hypercalls should only be invoked from the guest kernel, not guest
      user programs, that is, with MSR[PR]=0.  Currently we check this in
      spapr_hypercall, returning H_PRIVILEGE if MSR[PR]=1.
      
      However, under KVM the state of MSR[PR] is already checked by the host
      kernel before passing the hypercall to qemu, making this check redundant.
      Worse, however, we don't generally synchronize KVM and qemu state on the
      hypercall path, meaning that qemu could incorrectly reject a hypercall
      because it has a stale MSR value.
      
      This patch fixes the problem by moving the privilege test exclusively to
      the TCG hypercall path.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      CC: qemu-stable@nongnu.org
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      efcb9383
  22. 04 10月, 2012 1 次提交
    • D
      pseries: Remove unnecessary locking from PAPR hash table hcalls · 35f9304d
      David Gibson 提交于
      In the paravirtualized environment provided by PAPR, there is a standard
      locking scheme so that hypercalls updating the hash page table from
      different guest threads don't corrupt the haah table state.  We implement
      this HVLOCK bit in out page table hypercalls.  However, it is not necessary
      in our case, since the hypercalls all run in the qemu environment under the
      big qemu lock.
      
      Therefore, this patch removes the locking code.  This has the additional
      advantage of freeing up a hash PTE bit which will be useful for migration
      support.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      35f9304d