1. 01 3月, 2010 3 次提交
    • A
      KVM: PPC: Get rid of unnecessary RFI · bc90923e
      Alexander Graf 提交于
      Using an RFI in IR=1 is dangerous. We need to set two SRRs and then do an RFI
      without getting interrupted at all, because every interrupt could potentially
      overwrite the SRR values.
      
      Fortunately, we don't need to RFI in at least this particular case of the code,
      so we can just replace it with an mtmsr and b.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      bc90923e
    • A
      KVM: PPC: Use PACA backed shadow vcpu · 7e57cba0
      Alexander Graf 提交于
      We're being horribly racy right now. All the entry and exit code hijacks
      random fields from the PACA that could easily be used by different code in
      case we get interrupted, for example by a #MC or even page fault.
      
      After discussing this with Ben, we figured it's best to reserve some more
      space in the PACA and just shove off some vcpu state to there.
      
      That way we can drastically improve the readability of the code, make it
      less racy and less complex.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      7e57cba0
    • A
      KVM: PPC: Enable lightweight exits again · 97c4cfbe
      Alexander Graf 提交于
      The PowerPC C ABI defines that registers r14-r31 need to be preserved across
      function calls. Since our exit handler is written in C, we can make use of that
      and don't need to reload r14-r31 on every entry/exit cycle.
      
      This technique is also used in the BookE code and is called "lightweight exits"
      there. To follow the tradition, it's called the same in Book3S.
      
      So far this optimization was disabled though, as the code didn't do what it was
      expected to do, but failed to work.
      
      This patch fixes and enables lightweight exits again.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      97c4cfbe
  2. 05 11月, 2009 1 次提交