Tom Rotenberg
2009-Oct-18 13:13 UTC
[Xen-devel] Adding another GPE section to an HVM, causes the original GPE to stop functioning
Hi all, I am working with Xen 3.4, and i''m using a Windows XP HVM. The problem i''m experiencing is as follows: I''m trying to add another GPE section, (for my own ACPI events), and i''m using the following patch: --- a/tools/firmware/hvmloader/acpi/static_tables.c Wed Oct 14 16:58:16 2009 +0200 +++ b/tools/firmware/hvmloader/acpi/static_tables.c Wed Oct 14 16:58:16 2009 +0200 @@ -65,6 +66,20 @@ .pm_tmr_len = ACPI_PM_TMR_BLK_BIT_WIDTH / 8, .gpe0_blk_len = ACPI_GPE0_BLK_LEN, /* ----- */ /* My own new GPE block, for my own ACPI events */ + .gpe1_blk = ACPI_GPE0_BLK_ADDRESS + ACPI_GPE0_BLK_LEN, + .gpe1_blk_len = ACPI_GPE0_BLK_LEN, + + .x_gpe1_blk = { + .address_space_id = ACPI_SYSTEM_IO, + .register_bit_width = ACPI_GPE0_BLK_LEN * 8, + .register_bit_offset = 0, + .address = ACPI_GPE0_BLK_ADDRESS + ACPI_GPE0_BLK_LEN, + }, + /* ---- */ + .p_lvl2_lat = 0x0fff, /* >100, means we do not support C2 state */ .p_lvl3_lat = 0x0fff, /* >1000, means we do not support C3 state */ .iapc_boot_arch = ACPI_8042, Since i have inserted this new GPE block, the outcome is, that my new GPE block is responding OK, however, the old GPE block (the regular Xen gpe0 block), isn''t responding anymore - thus i can''t hot-plugqhot-unplug PT devices. I have analyzed the qemu logs a little bit, and it looks like, since the addition of the new GPE block, Windows for some reason, only enables the new gpe block (gpe1 block), and disables the old gpe block (regular Xen gpe0 block). Can someone please assist me with this issue? Tom _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Oct-18 16:33 UTC
Re: [Xen-devel] Adding another GPE section to an HVM, causes the original GPE to stop functioning
On 18/10/2009 14:13, "Tom Rotenberg" <tom.rotenberg@gmail.com> wrote:> Since i have inserted this new GPE block, the outcome is, that my new > GPE block is responding OK, however, the old GPE block (the regular > Xen gpe0 block), isn''t responding anymore - thus i can''t > hot-plugqhot-unplug PT devices. > > I have analyzed the qemu logs a little bit, and it looks like, since > the addition of the new GPE block, Windows for some reason, only > enables the new gpe block (gpe1 block), and disables the old gpe block > (regular Xen gpe0 block). > > Can someone please assist me with this issue?Since you do not set Fadt.gpe1_base, gpe1''s events are precisely overlapping with gpe0''s. This is actually a bug, and Windows is interpreting the broken tables as best it can, by assuming that GPE1 overrides GPE0. Probably you mean to set Fadt.gpe1_base=(ACPI_GPE0_LEN/2)*8 or something like that. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Tom Rotenberg
2009-Oct-18 18:35 UTC
Re: [Xen-devel] Adding another GPE section to an HVM, causes the original GPE to stop functioning
Keir, You are right! I just set gpe1_base, and it''s working like a charm! Thanks a lot! Tom On Sun, Oct 18, 2009 at 6:33 PM, Keir Fraser <keir.fraser@eu.citrix.com> wrote:> On 18/10/2009 14:13, "Tom Rotenberg" <tom.rotenberg@gmail.com> wrote: > >> Since i have inserted this new GPE block, the outcome is, that my new >> GPE block is responding OK, however, the old GPE block (the regular >> Xen gpe0 block), isn''t responding anymore - thus i can''t >> hot-plugqhot-unplug PT devices. >> >> I have analyzed the qemu logs a little bit, and it looks like, since >> the addition of the new GPE block, Windows for some reason, only >> enables the new gpe block (gpe1 block), and disables the old gpe block >> (regular Xen gpe0 block). >> >> Can someone please assist me with this issue? > > Since you do not set Fadt.gpe1_base, gpe1''s events are precisely overlapping > with gpe0''s. This is actually a bug, and Windows is interpreting the broken > tables as best it can, by assuming that GPE1 overrides GPE0. Probably you > mean to set Fadt.gpe1_base=(ACPI_GPE0_LEN/2)*8 or something like that. > > -- Keir > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel