[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Fix acpi_dmar_zap/reinstate() (fixes S3 regression)



>>> On 22.01.13 at 16:27, Tomasz Wroblewski <tomasz.wroblewski@xxxxxxxxxx> 
>>> wrote:
> attaching updated patch which uses ioremap() instead of acpi_get_table. 

First of all, I envisioned to keep the static variable "dmar_table",
and simply intialize it when the hypervisor boots. That, as a result,
will move all of your new code additions to .init.text (which in turn
will make it desirable to pick a different ACPI source file to add the
new function in).

Second, adding a function to be called from outside ACPI to
acpi/actables.h is wrong, which you could also have noticed by
the fact that you had the add the inclusion of that header.

Along the same lines, publicly accessible table interfaces are
expected to be in drivers/acpi/tables.c or
drivers/acpi/tables/tbxface.c. Probably the latter is better
suited.

Finally, when adding code to ACPI source files, please make sure
you match the coding conventions found in those files, not the
general Xen ones (and certainly not a mixture of both).

> Tested it across some S3 iterations on xen tip from today and Lenovo 
> T520 and seems to work well (although there are some unrelated scheduler 
> issues on resume which we have patched separately on our end; intending 
> to submit these patches as well later on). Doesn't work on older trees 
> from before your "implement vmap()" commit. You mentioned that this 
> would be fixable on older trees via adding the acpi table range to the 
> 1:1 mapping - how would one go about this as I'm not sure where is the 
> relevant code located?

That ought to be a simple call to map_pages_to_xen(), equivalent
to the respective ones in __start_xen(). Perhaps something like

    map_pages_to_xen(__va(addr), PFN_DOWN(addr), <nr>, PAGE_HYPERVISOR);

You'd then simply set "dmar_table" to __va(addr).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.