WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH V2] hvmloader: Fix FADT table for QEMU Upstream.

To: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH V2] hvmloader: Fix FADT table for QEMU Upstream.
From: Keir Fraser <keir@xxxxxxx>
Date: Tue, 26 Jul 2011 18:48:46 +0100
Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, Tobias Geiger <tobias.geiger@xxxxxxxxx>
Delivery-date: Tue, 26 Jul 2011 10:49:55 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=dpruIKcSGkmUQ5rTLc6oHGUiULYhvZAD8caS4TA+qag=; b=NlsLFqZsEEX/C+fLCtZldCz3xwhT4OJQj4BdIDxV3njewzw5mGJ7LqAtyS7OCNBxhg vyAFMLQ4iiVW2z5j8AB8opzfuqGZxJTV1ZKmTdxbT2CvRBeYbqQKHJOyX6eBzRbXqvHN DeP1VlAsS1VRHzf+3JxCxV/Kkw4cjCp1tlnRs=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1311690181-32378-1-git-send-email-anthony.perard@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcxLvERgSudAtmYP90uS+ELY5/QcnQ==
Thread-topic: [Xen-devel] [PATCH V2] hvmloader: Fix FADT table for QEMU Upstream.
User-agent: Microsoft-Entourage/12.30.0.110427
Thinking about this some more I wonder whether this will be correct for old
Qemu. Furthermore, we don't actually have a legacy/SMM component in our
virtual firmware, so advertising the enable/disable mechanism via
SMI_CMD_IOPORT is a bit pointless.

Could we instead dynamically handle this in in hvmloader's acpi-handling
code something like:
 if ( !SCI_EN ) // must be new qemu if so
    outb(SMI_CMD_IOPORT, PIIX4_ACPI_ENABLE)
 BUG_ON(!SCI_EN)

Or alternatively, we should at least gate the setting of those FADT fields
on such a check, it seems to me.

 -- Keir


On 26/07/2011 15:23, "Anthony PERARD" <anthony.perard@xxxxxxxxxx> wrote:

> When booting a Windows guest, the OS report an issue with the ACPI (in a
> BSOD). The exact issue is "SCI_EN never becomes set in PM1 Control
> Register." (quoted from WinDbg help).
> 
> To fix this, this patch set some value related to the QEMU upstream: The
> SMI command port, and the acpi_enable/acpi_disable values.
> 
> Reported-by: Tobias Geiger <tobias.geiger@xxxxxxxxx>
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> ---
>  tools/firmware/hvmloader/acpi/static_tables.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> Change:
>   - this time, always set, even on old QEMU.
>   - Add more descriptive macro.
> 
> diff --git a/tools/firmware/hvmloader/acpi/static_tables.c
> b/tools/firmware/hvmloader/acpi/static_tables.c
> index cf4b8dc..b68f6e1 100644
> --- a/tools/firmware/hvmloader/acpi/static_tables.c
> +++ b/tools/firmware/hvmloader/acpi/static_tables.c
> @@ -42,6 +42,10 @@ struct acpi_20_facs Facs = {
>  #define ACPI_PM_TMR_BLK_BIT_WIDTH           0x20
>  #define ACPI_PM_TMR_BLK_BIT_OFFSET          0x00
>  
> +#define SMI_CMD_IOPORT                      0xb2
> +#define PIIX4_ACPI_ENABLE                   0xf1
> +#define PIIX4_ACPI_DISABLE                  0xf0
> +
>  struct acpi_20_fadt Fadt = {
>      .header = {
>          .signature    = ACPI_2_0_FADT_SIGNATURE,
> @@ -55,6 +59,10 @@ struct acpi_20_fadt Fadt = {
>      },
>  
>      .sci_int = 9,
> +    .smi_cmd = SMI_CMD_IOPORT,
> +
> +    .acpi_enable = PIIX4_ACPI_ENABLE,
> +    .acpi_disable = PIIX4_ACPI_DISABLE,
>  
>      .pm1a_evt_blk = ACPI_PM1A_EVT_BLK_ADDRESS_V1,
>      .pm1a_cnt_blk = ACPI_PM1A_CNT_BLK_ADDRESS_V1,



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel