From 79241bb628fc38e10d71a6978ef8241b3a4ff0d6 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 10 Jun 2010 21:15:26 +0400 Subject: [PATCH] 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" Signed-off-by: Cyrill Gorcunov --- main.c | 2 +- tests/pit/tick.S | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index ded9dda..9223f93 100644 --- a/main.c +++ b/main.c @@ -134,7 +134,7 @@ exit_kvm: if (dbgtest_mode) { if (kvm->kvm_run->exit_reason == KVM_EXIT_IO && - kvm->kvm_run->io.port == 0) + kvm->kvm_run->io.port == 0xe0) fprintf(stderr, "KVM: this is an expected IO error\n"); goto out; } diff --git a/tests/pit/tick.S b/tests/pit/tick.S index 8c98e31..b9e5a80 100644 --- a/tests/pit/tick.S +++ b/tests/pit/tick.S @@ -4,7 +4,14 @@ #define TIMER_FREQ 1193182 #define TIMER_DIV(x) ((TIMER_FREQ+(x)/2)/(x)) -#define DBG_PORT 0 +/* + * hpa noted: + * + * 0xe0..0xef are "motherboard specific", but 0xe9 is + * used for Bochs debugging and 0xed is the Phoenix-reserved + * delay port + */ +#define DBG_PORT 0xe0 #define TEST_COUNT 0x0200