aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-05-06 16:20:54 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-05-06 16:20:54 +0100
commit08fe56f0cd8c00e4b3e12874cfc5c98fa7466e3b (patch)
tree2cecf4f9f036731eba35a2dfb3fc1f8b25481459
parentdf4d2e7b701450197d35aa851463e1329b20981c (diff)
downloadxen-08fe56f0cd8c00e4b3e12874cfc5c98fa7466e3b.tar.gz
xen-08fe56f0cd8c00e4b3e12874cfc5c98fa7466e3b.tar.bz2
xen-08fe56f0cd8c00e4b3e12874cfc5c98fa7466e3b.zip
x86 hvm: Warn only once per time source when the periodic tiemout is
set 'too small'. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
-rw-r--r--xen/arch/x86/hvm/vpt.c6
-rw-r--r--xen/include/asm-x86/hvm/vpt.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c
index 16f886647d..832c9042d7 100644
--- a/xen/arch/x86/hvm/vpt.c
+++ b/xen/arch/x86/hvm/vpt.c
@@ -338,9 +338,9 @@ void create_periodic_time(
/* Periodic timer must be at least 0.9ms. */
if ( (period < 900000) && !one_shot )
{
- gdprintk(XENLOG_WARNING,
- "HVM_PlatformTime: program too small period %"PRIu64"\n",
- period);
+ if ( !test_and_set_bool(pt->warned_timeout_too_short) )
+ gdprintk(XENLOG_WARNING, "HVM_PlatformTime: program too "
+ "small period %"PRIu64"\n", period);
period = 900000;
}
diff --git a/xen/include/asm-x86/hvm/vpt.h b/xen/include/asm-x86/hvm/vpt.h
index b7176e89b1..d05d0dfa27 100644
--- a/xen/include/asm-x86/hvm/vpt.h
+++ b/xen/include/asm-x86/hvm/vpt.h
@@ -78,6 +78,7 @@ struct periodic_time {
bool_t one_shot;
bool_t do_not_freeze;
bool_t irq_issued;
+ bool_t warned_timeout_too_short;
#define PTSRC_isa 1 /* ISA time source */
#define PTSRC_lapic 2 /* LAPIC time source */
u8 source; /* PTSRC_ */