1. 30 6月, 2013 1 次提交
  2. 26 9月, 2011 1 次提交
    • A
      KVM: PPC: Interpret SDR1 as HVA in PAPR mode · 04fcc11b
      Alexander Graf 提交于
      When running a PAPR guest, the guest is not allowed to set SDR1 - instead
      the HTAB information is held in internal hypervisor structures. But all of
      our current code relies on SDR1 and walking the HTAB like on real hardware.
      
      So in order to not be too intrusive, we simply set SDR1 to the HTAB we hold
      in host memory. That way we can keep the HTAB in user space, but use it from
      kernel space to map the guest.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      04fcc11b
  3. 12 7月, 2011 1 次提交
  4. 24 10月, 2010 2 次提交
    • A
      KVM: PPC: Magic Page Book3s support · e8508940
      Alexander Graf 提交于
      We need to override EA as well as PA lookups for the magic page. When the guest
      tells us to project it, the magic page overrides any guest mappings.
      
      In order to reflect that, we need to hook into all the MMU layers of KVM to
      force map the magic page if necessary.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      e8508940
    • A
      KVM: PPC: Convert MSR to shared page · 666e7252
      Alexander Graf 提交于
      One of the most obvious registers to share with the guest directly is the
      MSR. The MSR contains the "interrupts enabled" flag which the guest has to
      toggle in critical sections.
      
      So in order to bring the overhead of interrupt en- and disabling down, let's
      put msr into the shared page. Keep in mind that even though you can fully read
      its contents, writing to it doesn't always update all state. There are a few
      safe fields that don't require hypervisor interaction. See the documentation
      for a list of MSR bits that are safe to be set from inside the guest.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      666e7252
  5. 17 5月, 2010 4 次提交
    • A
      KVM: PPC: Set VSID_PR also for Book3S_64 · 63556441
      Alexander Graf 提交于
      Book3S_64 didn't set VSID_PR when we're in PR=1. This lead to pretty bad
      behavior when searching for the shadow segment, as part of the code relied
      on VSID_PR being set.
      
      This patch fixes booting Book3S_64 guests.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      63556441
    • A
      KVM: PPC: Improve split mode · f7bc74e1
      Alexander Graf 提交于
      When in split mode, instruction relocation and data relocation are not equal.
      
      So far we implemented this mode by reserving a special pseudo-VSID for the
      two cases and flushing all PTEs when going into split mode, which is slow.
      
      Unfortunately 32bit Linux and Mac OS X use split mode extensively. So to not
      slow down things too much, I came up with a different idea: Mark the split
      mode with a bit in the VSID and then treat it like any other segment.
      
      This means we can just flush the shadow segment cache, but keep the PTEs
      intact. I verified that this works with ppc32 Linux and Mac OS X 10.4
      guests and does speed them up.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      f7bc74e1
    • A
      KVM: PPC: Convert u64 -> ulong · af7b4d10
      Alexander Graf 提交于
      There are some pieces in the code that I overlooked that still use
      u64s instead of longs. This slows down 32 bit hosts unnecessarily, so
      let's just move them to ulong.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      af7b4d10
    • A
      KVM: PPC: Improve indirect svcpu accessors · c7f38f46
      Alexander Graf 提交于
      We already have some inline fuctions we use to access vcpu or svcpu structs,
      depending on whether we're on booke or book3s. Since we just put a few more
      registers into the svcpu, we also need to make sure the respective callbacks
      are available and get used.
      
      So this patch moves direct use of the now in the svcpu struct fields to
      inline function calls. While at it, it also moves the definition of those
      inline function calls to respective header files for booke and book3s,
      greatly improving readability.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      c7f38f46
  6. 01 3月, 2010 1 次提交
    • A
      KVM: PPC: Make large pages work · 4b5c9b7f
      Alexander Graf 提交于
      An SLB entry contains two pieces of information related to size:
      
        1) PTE size
        2) SLB size
      
      The L bit defines the PTE be "large" (usually means 16MB),
      SLB_VSID_B_1T defines that the SLB should span 1 GB instead of the
      default 256MB.
      
      Apparently I messed things up and just put those two in one box,
      shaked it heavily and came up with the current code which handles
      large pages incorrectly, because it also treats large page SLB entries
      as "1TB" segment entries.
      
      This patch splits those two features apart, making Linux guests boot
      even when they have > 256MB.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      4b5c9b7f
  7. 27 12月, 2009 1 次提交
  8. 08 12月, 2009 1 次提交
  9. 05 11月, 2009 1 次提交