10 Sep, 2009

3 commits


24 Mar, 2009

1 commit


31 Dec, 2008

7 commits

  • Existing KVM statistics are either just counters (kvm_stat) reported for
    KVM generally or trace based aproaches like kvm_trace.
    For KVM on powerpc we had the need to track the timings of the different exit
    types. While this could be achieved parsing data created with a kvm_trace
    extension this adds too much overhead (at least on embedded PowerPC) slowing
    down the workloads we wanted to measure.

    Therefore this patch adds a in-kernel exit timing statistic to the powerpc kvm
    code. These statistic is available per vm&vcpu under the kvm debugfs directory.
    As this statistic is low, but still some overhead it can be enabled via a
    .config entry and should be off by default.

    Since this patch touched all powerpc kvm_stat code anyway this code is now
    merged and simplified together with the exit timing statistic code (still
    working with exit timing disabled in .config).

    Signed-off-by: Christian Ehrhardt
    Signed-off-by: Hollis Blanchard
    Signed-off-by: Avi Kivity

    Hollis Blanchard
     
  • set ESR[PTR] when emulating a guest trap. This allows Linux guests to
    properly handle WARN_ON() (i.e. detect that it's a non-fatal trap).

    Also remove debugging printk in trap emulation.

    Signed-off-by: Hollis Blanchard
    Signed-off-by: Avi Kivity

    Hollis Blanchard
     
  • However, some of these fields could be split into separate per-core structures
    in the future.

    Signed-off-by: Hollis Blanchard
    Signed-off-by: Avi Kivity

    Hollis Blanchard
     
  • Cores provide 3 emulation hooks, implemented for example in the new
    4xx_emulate.c:
    kvmppc_core_emulate_op
    kvmppc_core_emulate_mtspr
    kvmppc_core_emulate_mfspr

    Strictly speaking the last two aren't necessary, but provide for more
    informative error reporting ("unknown SPR").

    Long term I'd like to have instruction decoding autogenerated from tables of
    opcodes, and that way we could aggregate universal, Book E, and core-specific
    instructions more easily and without redundant switch statements.

    Signed-off-by: Hollis Blanchard
    Signed-off-by: Avi Kivity

    Hollis Blanchard
     
  • This is used in a couple places in KVM, but isn't KVM-specific.

    However, this patch doesn't modify other in-kernel emulation code:
    - xmon uses a direct copy of ppc_opc.c from binutils
    - emulate_instruction() doesn't need it because it can use a series
    of mask tests.

    Signed-off-by: Hollis Blanchard
    Acked-by: Paul Mackerras
    Signed-off-by: Avi Kivity

    Hollis Blanchard
     
  • This introduces a set of core-provided hooks. For 440, some of these are
    implemented by booke.c, with the rest in (the new) 44x.c.

    Note that these hooks are link-time, not run-time. Since it is not possible to
    build a single kernel for both e500 and 440 (for example), using function
    pointers would only add overhead.

    Signed-off-by: Hollis Blanchard
    Signed-off-by: Avi Kivity

    Hollis Blanchard
     
  • This will make it easier to provide implementations for other cores.

    Signed-off-by: Hollis Blanchard
    Signed-off-by: Avi Kivity

    Hollis Blanchard
     

15 Oct, 2008

3 commits

  • When we use TID=N userspace mappings, we must ensure that kernel mappings have
    been destroyed when entering userspace. Using TID=1/TID=0 for kernel/user
    mappings and running userspace with PID=0 means that userspace can't access the
    kernel mappings, but the kernel can directly access userspace.

    The net is that we don't need to flush the TLB on privilege switches, but we do
    on guest context switches (which are far more infrequent). Guest boot time
    performance improvement: about 30%.

    Signed-off-by: Hollis Blanchard
    Signed-off-by: Avi Kivity

    Hollis Blanchard
     
  • This patch adds a trace point for the instruction emulation on embedded powerpc
    utilizing the KVM_TRACE interface.

    Signed-off-by: Christian Ehrhardt
    Signed-off-by: Avi Kivity

    Christian Ehrhardt
     
  • This patch adds trace points to track powerpc TLB activities using the
    KVM_TRACE infrastructure.

    Signed-off-by: Jerone Young
    Signed-off-by: Christian Ehrhardt
    Signed-off-by: Avi Kivity

    Jerone Young
     

27 Jul, 2008

1 commit


07 Jun, 2008

1 commit


27 Apr, 2008

1 commit

  • This functionality is definitely experimental, but is capable of running
    unmodified PowerPC 440 Linux kernels as guests on a PowerPC 440 host. (Only
    tested with 440EP "Bamboo" guests so far, but with appropriate userspace
    support other SoC/board combinations should work.)

    See Documentation/powerpc/kvm_440.txt for technical details.

    [stephen: build fix]

    Signed-off-by: Hollis Blanchard
    Acked-by: Paul Mackerras
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Avi Kivity

    Hollis Blanchard