Due to IPF Guest Firmware will enumerate PCI, shutdown in IPF doesn't work This patch makes shutdown work for IPF. Signed-off-by, Anthony Xu < anthony.xu@intel.com > diff -r 11b718eb22c9 tools/ioemu/hw/piix4acpi.c --- a/tools/ioemu/hw/piix4acpi.c Thu Nov 02 12:43:04 2006 -0700 +++ b/tools/ioemu/hw/piix4acpi.c Fri Nov 10 17:10:59 2006 +0800 @@ -398,8 +398,15 @@ void pci_piix4_acpi_init(PCIBus *bus, in pci_conf[0x0e] = 0x00; pci_conf[0x3d] = 0x01; /* Hardwired to PIRQA is used */ - pci_register_io_region((PCIDevice *)d, 4, 0x10, - PCI_ADDRESS_SPACE_IO, acpi_map); - + + /* PMBA POWER MANAGEMENT BASE ADDRESS, hardcoded to 0x1f40 + * to make shutdown work for IPF, due to IPF Guest Firmware + * will enumerate pci devices. + * + * TODO: if Guest Firmware or Guest OS will change this PMBA, + * More logic will be added. + */ + pci_conf[0x40] = 0x1f41; + acpi_map(d, 0, 0x1f40, 0x10, PCI_ADDRESS_SPACE_IO); acpi_reset(d); } diff -r 11b718eb22c9 xen/include/public/hvm/ioreq.h --- a/xen/include/public/hvm/ioreq.h Thu Nov 02 12:43:04 2006 -0700 +++ b/xen/include/public/hvm/ioreq.h Fri Nov 10 17:10:59 2006 +0800 @@ -86,7 +86,7 @@ struct buffered_iopage { }; /* sizeof this structure must be in one page */ typedef struct buffered_iopage buffered_iopage_t; -#define ACPI_PM1A_EVT_BLK_ADDRESS 0x000000000000c010 +#define ACPI_PM1A_EVT_BLK_ADDRESS 0x0000000000001f40 #define ACPI_PM1A_CNT_BLK_ADDRESS (ACPI_PM1A_EVT_BLK_ADDRESS + 0x04) #define ACPI_PM_TMR_BLK_ADDRESS (ACPI_PM1A_EVT_BLK_ADDRESS + 0x08)