[HVM] Clean up two small APIC TDCR issues.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 9 Nov 2006 17:53:05 +0000 (17:53 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 9 Nov 2006 17:53:05 +0000 (17:53 +0000)
commitefeebd10a1e79133a295809618d31d69ea2284be
treeecbe4426150b60c4647847e1e3027a7021560ff7
parent234e62fc694fc71d58bde9e5217941efaac87797
[HVM] Clean up two small APIC TDCR issues.

First, only save the bits that can be set, so that on a subsequent
read can't see MBZ bits as set. Next, be sure to initialize the
timer_divide_count, which is derived from the TDCR.  This avoids a
potential divide-by-zero elsewhere in the code.

The original patch was provided by Ben Thomas <ben@virtualiron.com>.
This modified version refactors the code slightly and renames
timer_divide_count to timer_divisor.

Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/hvm/vlapic.c
xen/include/asm-x86/hvm/vlapic.h