1. 24 10月, 2010 9 次提交
    • A
      KVM: PPC: Tell guest about pending interrupts · 90bba358
      Alexander Graf 提交于
      When the guest turns on interrupts again, it needs to know if we have an
      interrupt pending for it. Because if so, it should rather get out of guest
      context and get the interrupt.
      
      So we introduce a new field in the shared page that we use to tell the guest
      that there's a pending interrupt lying around.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      90bba358
    • A
      KVM: PPC: Add PV guest critical sections · 5c6cedf4
      Alexander Graf 提交于
      When running in hooked code we need a way to disable interrupts without
      clobbering any interrupts or exiting out to the hypervisor.
      
      To achieve this, we have an additional critical field in the shared page. If
      that field is equal to the r1 register of the guest, it tells the hypervisor
      that we're in such a critical section and thus may not receive any interrupts.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      5c6cedf4
    • A
      KVM: PPC: Implement hypervisor interface · 2a342ed5
      Alexander Graf 提交于
      To communicate with KVM directly we need to plumb some sort of interface
      between the guest and KVM. Usually those interfaces use hypercalls.
      
      This hypercall implementation is described in the last patch of the series
      in a special documentation file. Please read that for further information.
      
      This patch implements stubs to handle KVM PPC hypercalls on the host and
      guest side alike.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      2a342ed5
    • A
      KVM: PPC: Convert SPRG[0-4] to shared page · a73a9599
      Alexander Graf 提交于
      When in kernel mode there are 4 additional registers available that are
      simple data storage. Instead of exiting to the hypervisor to read and
      write those, we can just share them with the guest using the page.
      
      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>
      a73a9599
    • A
      KVM: PPC: Convert SRR0 and SRR1 to shared page · de7906c3
      Alexander Graf 提交于
      The SRR0 and SRR1 registers contain cached values of the PC and MSR
      respectively. They get written to by the hypervisor when an interrupt
      occurs or directly by the kernel. They are also used to tell the rfi(d)
      instruction where to jump to.
      
      Because it only gets touched on defined events that, it's very simple to
      share with the guest. Hypervisor and guest both have full r/w access.
      
      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>
      de7906c3
    • 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
    • A
      KVM: PPC: Introduce shared page · 96bc451a
      Alexander Graf 提交于
      For transparent variable sharing between the hypervisor and guest, I introduce
      a shared page. This shared page will contain all the registers the guest can
      read and write safely without exiting guest context.
      
      This patch only implements the stubs required for the basic structure of the
      shared page. The actual register moving follows.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      96bc451a
  2. 01 8月, 2010 3 次提交
  3. 19 5月, 2010 3 次提交
  4. 17 5月, 2010 19 次提交
  5. 25 4月, 2010 6 次提交