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

[xen staging] x86/HyperV: correct hv_hcall_page for xen.efi build



commit 0c9751b53c2ee135fd484a03fd47f3bb5fbe63b8
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon May 4 11:54:35 2020 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon May 4 11:54:35 2020 +0200

    x86/HyperV: correct hv_hcall_page for xen.efi build
    
    Along the lines of what the not reverted part of 3c4b2eef4941 ("x86:
    refine link time stub area related assertion") did, we need to transform
    the absolute HV_HCALL_PAGE into the image base relative hv_hcall_page
    (or else there'd be no need for two distinct symbols). Otherwise
    mkreloc, as used for generating the base relocations of xen.efi, will
    spit out warnings like "Difference at .text:0009b74f is 0xc0000000
    (expected 0x40000000)". As long as the offending relocations are PC
    relative ones, the generated binary is correct afaict, but if there ever
    was the absolute address stored, xen.efi would miss a fixup for it.
    
    Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Wei Liu <wl@xxxxxxx>
---
 xen/arch/x86/xen.lds.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
index 7f9459d683..0e3a733cab 100644
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -327,7 +327,7 @@ SECTIONS
 #endif
 
 #ifdef CONFIG_HYPERV_GUEST
-  hv_hcall_page = ABSOLUTE(HV_HCALL_PAGE);
+  hv_hcall_page = ABSOLUTE(HV_HCALL_PAGE - XEN_VIRT_START + __XEN_VIRT_START);
 #endif
 
   /* Sections to be discarded */
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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