Commit b464b461 authored by Jason Andryuk's avatar Jason Andryuk Committed by Juergen Gross

x86/pvh: Set phys_base when calling xen_prepare_pvh()

phys_base needs to be set for __pa() to work in xen_pvh_init() when
finding the hypercall page.  Set it before calling into
xen_prepare_pvh(), which calls xen_pvh_init().  Clear it afterward to
avoid __startup_64() adding to it and creating an incorrect value.
Signed-off-by: default avatarJason Andryuk <jason.andryuk@amd.com>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Message-ID: <20240823193630.2583107-4-jason.andryuk@amd.com>
Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
parent 1db29f99
......@@ -125,7 +125,20 @@ SYM_CODE_START_LOCAL(pvh_start_xen)
xor %edx, %edx
wrmsr
/*
* Calculate load offset and store in phys_base. __pa() needs
* phys_base set to calculate the hypercall page in xen_pvh_init().
*/
movq %rbp, %rbx
subq $_pa(pvh_start_xen), %rbx
movq %rbx, phys_base(%rip)
call xen_prepare_pvh
/*
* Clear phys_base. __startup_64 will *add* to its value,
* so reset to 0.
*/
xor %rbx, %rbx
movq %rbx, phys_base(%rip)
/* startup_64 expects boot_params in %rsi. */
lea pvh_bootparams(%rip), %rsi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment