[kvm-unit-tests PATCH v2 0/5] Check emulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series adds exception handler to be able to test instruction
emulation. We test then invalid instruction, lswx instruction, and
check that lswx instruction triggers an alignment interrupt in
little-endian mode. During the development of this series, I've seen
that processor is not running in 64bit mode, so I've added a test
to check that is the case now.

This has been tested with KVM PR, HV, TCG in big and little-endian mode.

KVM-PR needs a fix to be able to manage correctly invalid instruction.
    http://patchwork.ozlabs.org/patch/597855/

QEMU needs a fix to initialize correctly the 64bit mode:
    http://patchwork.ozlabs.org/patch/598198/

With TCG, some lswx tests fail because it needs some fixes... I'm working
on this.

v2: 
    clearly restore r1 in call_handler
    use "exception_stack[cpu + 1]" instead of "exception_stack + cpu + 1"
    check program check type (invalid instruction)
    add "-v" parameter to display invalid instruction address
    use "mtxer" instead of "mtspr"
    Fix comments in lswx asm()
    add "memory" in clobber list
    add Thomas' Rb on patches 3 and 5.

Laurent Vivier (5):
  powerpc: add exception handler
  powerpc: add test to check invalid instruction trap
  powerpc: check 64bit mode
  powerpc: check lswx
  powerpc: Check lswx in little-endian mode.

 lib/powerpc/asm/hcall.h     |   1 +
 lib/powerpc/asm/ppc_asm.h   |   5 +
 lib/powerpc/asm/processor.h |  11 ++
 lib/powerpc/processor.c     |  38 +++++++
 lib/powerpc/setup.c         |  19 ++++
 lib/ppc64/asm-offsets.c     |  42 ++++++++
 lib/ppc64/asm/processor.h   |   1 +
 lib/ppc64/asm/ptrace.h      |  24 +++++
 powerpc/Makefile.common     |   6 +-
 powerpc/cstart64.S          | 140 +++++++++++++++++++++++++
 powerpc/emulator.c          | 241 ++++++++++++++++++++++++++++++++++++++++++++
 powerpc/unittests.cfg       |   3 +
 12 files changed, 530 insertions(+), 1 deletion(-)
 create mode 100644 lib/powerpc/asm/processor.h
 create mode 100644 lib/powerpc/processor.c
 create mode 100644 lib/ppc64/asm/processor.h
 create mode 100644 lib/ppc64/asm/ptrace.h
 create mode 100644 powerpc/emulator.c

-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux