Created attachment 479501 [details] backport of gdbsx, suffering from this bug Description of problem: hap_gva_to_gfn_* functions do not preserve domain context when requesting mfn from gfn, returning the current domain's mfn regardless of wanted domain. Ecountered while backporting gdbsx, where dom0 was current domain, yet information about paused guest was wanted. How reproducible: Always. Steps to reproduce: 1. Backport gdbsx (patch attached) 2. Run the modified hypervisor with enabled hap. (hardware support required) 3. Start debugging a hvm machine (howto in tools/gdbsx/README) 4. See it fail on a breakpoint. Actual results: (gdbsx output) ERROR:xg_write_mem:ERROR: failed to write 0 bytes. errno:14 rc:-1 Expected results: (No error and the breakpoint works)
Created attachment 479503 [details] fix, using different function to get mfn from gfn get_mfn_from_gpfn(gfn) calls gfn_to_mfn_current(pfn), proposed patch uses gfn_to_mfn(domain, gfn) instead, which calls either gfn_to_mfn_current(pfn), or gfn_to_mfn_foreign(domain, gfn), depending on context, thus fixing the bug with little overhead.
Created attachment 479539 [details] fix, using different function to get mfn from gfn The last patch was not using mfn_x, hence failing typecheck. Replaced gfn_to_mfn by gmfn_to_mfn. (macro for mfn_x(gfn_to_mfn))
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
Patch(es) available in kernel-2.6.18-248.el5 Detailed testing feedback is always welcomed.
We checked the -257 code, confirming that the patches are inside. Due to comment 5, debug tools won't be packaged with any release, thus this shouldn't need any specific testing. Setting this 'Verified:SanityOnly'.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-1065.html