aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-05-21 10:15:13 +0200
committerJan Beulich <jbeulich@suse.com>2013-05-21 10:15:13 +0200
commit3fa7fb8b86b89167153fa457b27620436d648969 (patch)
treedc4a0c3d75a1f4ca16065c34093b3b510ff2663d /tools/firmware
parent9607327abbd3e77bde6cc7b5327f3efd781fc06e (diff)
downloadxen-3fa7fb8b86b89167153fa457b27620436d648969.tar.gz
xen-3fa7fb8b86b89167153fa457b27620436d648969.tar.bz2
xen-3fa7fb8b86b89167153fa457b27620436d648969.zip
x86/HVM: RTC code must be in line with WAET flags passed by hvmloader
With hvmloader telling the guest that it may skip REG_C reads during the processing of RTC interrupts, the emulation code must not depend upon these reads to occur. Introduce two modes of operation for the emulation code, and short of a HVM parameter (too late to be introduced for 4.3) hard code the mode determination to always assume that Windows-conforming one for the time being. Signed-off-by: Jan Beulich <jbeulich@suse.com> Tested-by: Roger Pau Monné <roger.pau@citrix.com> (FreeBSD guest)
Diffstat (limited to 'tools/firmware')
-rw-r--r--tools/firmware/hvmloader/acpi/static_tables.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/firmware/hvmloader/acpi/static_tables.c b/tools/firmware/hvmloader/acpi/static_tables.c
index f98c8d2d10..323ae3124c 100644
--- a/tools/firmware/hvmloader/acpi/static_tables.c
+++ b/tools/firmware/hvmloader/acpi/static_tables.c
@@ -136,11 +136,15 @@ struct acpi_20_rsdp Rsdp = {
.length = sizeof(struct acpi_20_rsdp)
};
-#define ACPI_WAET_RTC_GOOD 0x00000001
-#define ACPI_WAET_PM_TIMER_GOOD 0x00000002
+#define ACPI_WAET_RTC_NO_ACK (1<<0) /* RTC requires no int acknowledge */
+#define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */
-#define ACPI_WAET_FLAGS (ACPI_WAET_RTC_GOOD | \
- ACPI_WAET_PM_TIMER_GOOD)
+/*
+ * The state of the RTC flag getting passed to the guest must be in
+ * sync with the mode selection in the hypervisor RTC emulation code.
+ */
+#define ACPI_WAET_FLAGS (ACPI_WAET_RTC_NO_ACK | \
+ ACPI_WAET_TIMER_ONE_READ)
struct acpi_20_waet Waet = {
.header = {