Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86/pvh: Call C code via the kernel virtual mapping
[ Upstream commit e8fbc0d ] Calling C code via a different mapping than it was linked at is problematic, because the compiler assumes that RIP-relative and absolute symbol references are interchangeable. GCC in particular may use RIP-relative per-CPU variable references even when not using -fpic. So call xen_prepare_pvh() via its kernel virtual mapping on x86_64, so that those RIP-relative references produce the correct values. This matches the pre-existing behavior for i386, which also invokes xen_prepare_pvh() via the kernel virtual mapping before invoking startup_32 with paging disabled again. Fixes: 7243b93 ("xen/pvh: Bootstrap PVH guest") Tested-by: Jason Andryuk <[email protected]> Reviewed-by: Jason Andryuk <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Message-ID: <[email protected]> Signed-off-by: Juergen Gross <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
- Loading branch information