1. 24 10月, 2010 3 次提交
    • A
      KVM: PPC: Convert DAR to shared page. · 5e030186
      Alexander Graf 提交于
      The DAR register contains the address a data page fault occured at. This
      register behaves pretty much like a simple data storage register that gets
      written to on data faults. There is no hypervisor interaction required on
      read or write.
      
      This patch converts all users of the current field to the shared page.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      5e030186
    • A
      KVM: PPC: Convert DSISR to shared page · d562de48
      Alexander Graf 提交于
      The DSISR register contains information about a data page fault. It is fully
      read/write from inside the guest context and we don't need to worry about
      interacting based on writes of this register.
      
      This patch converts all users of the current field to the shared page.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      d562de48
    • 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
  2. 17 5月, 2010 9 次提交
  3. 25 4月, 2010 5 次提交
    • A
      KVM: PPC: Implement Paired Single emulation · 831317b6
      Alexander Graf 提交于
      The one big thing about the Gekko is paired singles.
      
      Paired singles are an extension to the instruction set, that adds 32 single
      precision floating point registers (qprs), some SPRs to modify the behavior
      of paired singled operations and instructions to deal with qprs to the
      instruction set.
      
      Unfortunately, it also changes semantics of existing operations that affect
      single values in FPRs. In most cases they get mirrored to the coresponding
      QPR.
      
      Thanks to that we need to emulate all FPU operations and all the new paired
      single operations too.
      
      In order to achieve that, we use the just introduced FPU call helpers to
      call the real FPU whenever the guest wants to modify an FPR. Additionally
      we also fix up the QPR values along the way.
      
      That way we can execute paired single FPU operations without implementing a
      soft fpu.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      831317b6
    • A
      KVM: PPC: Fix error in BAT assignment · dba2e123
      Alexander Graf 提交于
      BATs didn't work. Well, they did, but only up to BAT3. As soon as we
      came to BAT4 the offset calculation was screwed up and we ended up
      overwriting BAT0-3.
      
      Fortunately, Linux hasn't been using BAT4+. It's still a good
      idea to write correct code though.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      dba2e123
    • A
      KVM: PPC: Make software load/store return eaddr · 5467a97d
      Alexander Graf 提交于
      The Book3S KVM implementation contains some helper functions to load and store
      data from and to virtual addresses.
      
      Unfortunately, this helper used to keep the physical address it so nicely
      found out for us to itself. So let's change that and make it return the
      physical address it resolved.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      5467a97d
    • A
      KVM: PPC: Implement mtsr instruction emulation · 71db4089
      Alexander Graf 提交于
      The Book3S_32 specifications allows for two instructions to modify segment
      registers: mtsrin and mtsr.
      
      Most normal operating systems use mtsrin, because it allows to define which
      segment it wants to change using a register. But since I was trying to run
      an embedded guest, it turned out to be using mtsr with hardcoded values.
      
      So let's also emulate mtsr. It's a valid instruction after all.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      71db4089
    • A
      KVM: PPC: Add Gekko SPRs · d6d549b2
      Alexander Graf 提交于
      The Gekko has some SPR values that differ from other PPC core values and
      also some additional ones.
      
      Let's add support for them in our mfspr/mtspr emulator.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      d6d549b2
  4. 01 3月, 2010 1 次提交
    • A
      KVM: PPC: Use accessor functions for GPR access · 8e5b26b5
      Alexander Graf 提交于
      All code in PPC KVM currently accesses gprs in the vcpu struct directly.
      
      While there's nothing wrong with that wrt the current way gprs are stored
      and loaded, it doesn't suffice for the PACA acceleration that will follow
      in this patchset.
      
      So let's just create little wrapper inline functions that we call whenever
      a GPR needs to be read from or written to. The compiled code shouldn't really
      change at all for now.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      8e5b26b5
  5. 08 12月, 2009 1 次提交
  6. 05 11月, 2009 1 次提交