9 Commits

Author SHA1 Message Date
Sasha Levin b0822113d5 kvm tools: don't exit on debug ioport write
While it shouldn't happen on regular guests, we sometimes hit it when fuzzing
within the guest, which would cause the lkvm process to exit - which is
undesired.

Our PIT tests were using the debug port to trigger a reboot. Instead of using
that port we now use the reboot line of our i8042 controller.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
2015-06-01 16:39:53 +01:00
Cyrill Gorcunov 79241bb628 kvm, tests: Use motherboard specific ports for testing
H. Peter Anvin suggested to use motherboard specific ports
for testing instead of ones well known. Thanks, Peter!

Reported-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2015-06-01 16:39:39 +01:00
Cyrill Gorcunov 3db4f1beb3 kvm: Add force exit from tests
To make so we write any value to port 0 and
start kvm in --dbgtest mode so we are expecting
for this exit.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2015-06-01 16:39:39 +01:00
Cyrill Gorcunov 339c64c83a tests/pit: Increase PIT frequency up to 1KHz
Otherwise it's too boring ;)

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2015-06-01 16:39:39 +01:00
Pekka Enberg 21dd76b3c5 kvm, test: Improve PIT test output
This patch makes the PIT test output less verbose.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2015-06-01 16:39:39 +01:00
Pekka Enberg 5cf0b4b1fa kvm: Add .gitignore for tests
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2015-06-01 16:39:39 +01:00
Cyrill Gorcunov 3ed8a92048 test/pit: Fill up IDT with noop handler
To cover all IRQs.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2015-06-01 16:39:39 +01:00
Cyrill Gorcunov 01c07d21e4 tests/pit: Issue cli on ISR handling
Better to not allow any nested maskable IRQs
while we handle timer irq.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2015-06-01 16:39:39 +01:00
Pekka Enberg c6cfeb1792 kvm, test: Move PIT tests to separate directory
This patch moves PIT tests to separate directory and adds Makefile for it.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2015-06-01 16:39:39 +01:00