From 3fa7fb8b86b89167153fa457b27620436d648969 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 21 May 2013 10:15:13 +0200 Subject: x86/HVM: RTC code must be in line with WAET flags passed by hvmloader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Roger Pau Monné (FreeBSD guest) --- tools/firmware/hvmloader/acpi/static_tables.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tools/firmware') 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 = { -- cgit v1.2.3