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][IPF][PATCH]Make shutdown work on IPF

To: "Keir Fraser" <keir@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel][IPF][PATCH]Make shutdown work on IPF
From: "Xu, Anthony" <anthony.xu@xxxxxxxxx>
Date: Mon, 13 Nov 2006 16:18:24 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 13 Nov 2006 00:18:42 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AccEq5NbAs9SSUeJQDuiSqUDGM6psAAC3ihqAJC5+XA=
Thread-topic: [Xen-devel][IPF][PATCH]Make shutdown work on IPF
Keir Fraser write on 2006年11月10日 18:58:
> This is very skanky. Also I'm not sure why you write a 16-bit value
> into an 8-bit array entry at offset 0x40 (that's not even a BAR
> offset). 
> 
Thanks, the new patch fixed this.

> The base address used by Xen should be configured dynamically by qemu,
> perhaps for now via an hvm_op set_param hypercall. We need this for
> x86 as well, since PCI enumeration will move to hvmloader and
> trusting the base address to remain constant is foolish anyway.

We can see that this BAR is at offset 0x40, so it is a device-specific BAR 
rather than normal PCI BAR, 
It should be ACPI driver(which is in Guest BIOS)'s responsibility to program 
this BAR rather than 
PCI enumeration.

Current implementation is a little interesting. BAR is programmed by PCI 
enumeration, but this base address
in ACPI afdt table is hardcoded as 0xc010, that means if we add or remove a PCI 
device in qemu,
the base address allocated by PCI enumeration may change, while this base 
address in ACPI afdt table
is still 0xc010,( which is hardcoded). So shutdown may fail on IA32.

Since currently there is no ACPI driver in Guest Firmware both on IA32 and IPF, 
It's reasonable that Qemu allocate the base address for ACPI 
hardware,(including hardcoding a base address).
IO addres below 0x1000 may used by legal device,
In IA32 side, PCI IO address is allocated from 0xc000,
In IPF side, PCI IO address is allocated from 0x2000.
So 0x1f40 is a safe address base.


In the future, if ACPI driver is implemented in Guest Firmware,
Definitely it shoulbe be ACPI driver to allocate the base address.
Then more logic should be added in qemu to allow ACPI driver to 
program this BAR.


Anthony





> 
>  -- Keir
> 
> On 10/11/06 09:35, "Xu, Anthony" <anthony.xu@xxxxxxxxx> wrote:
> 
>> Due to IPF Guest Firmware will enumerate PCI, shutdown in IPF
>> doesn't work This patch makes shutdown work for IPF.
>> 
>> Tested on IA64 and IA32 side.
>> 
>> 
>> Signed-off-by, Anthony Xu < anthony.xu@xxxxxxxxx >

Attachment: acpi_shutdown1.patch
Description: acpi_shutdown1.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>