Commit e8fbc0d
x86/pvh: Call C code via the kernel virtual mapping
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]>1 parent 8198375 commit e8fbc0d
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
176 | 183 | | |
177 | 184 | | |
178 | 185 | | |
| |||
0 commit comments