|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 3/7] x86/hyperv: provide Hyper-V hypercall functions
On Thu, Jan 23, 2020 at 11:13:10AM +0100, Jan Beulich wrote:
> On 22.01.2020 22:57, Andrew Cooper wrote:
> > On 22/01/2020 20:23, Wei Liu wrote:
> >> These functions will be used later to make hypercalls to Hyper-V.
> >>
> >> Signed-off-by: Wei Liu <liuwe@xxxxxxxxxxxxx>
> >
> > After some experimentation,
> >
> > diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
> > index cbc5701214..3708a60b5c 100644
> > --- a/xen/arch/x86/xen.lds.S
> > +++ b/xen/arch/x86/xen.lds.S
> > @@ -329,6 +329,8 @@ SECTIONS
> > efi = .;
> > #endif
> >
> > + hv_hcall_page = ABSOLUTE(0xffff82d0bfffe000);
> > +
> > /* Sections to be discarded */
> > /DISCARD/ : {
> > *(.exit.text)
> >
> > in the linker script lets direct calls work correctly:
> >
> > ffff82d080637935: b9 01 00 00 40 mov $0x40000001,%ecx
> > ffff82d08063793a: 0f 30 wrmsr
> > ffff82d08063793c: ba 21 03 00 00 mov $0x321,%edx
> > ffff82d080637941: bf 01 00 00 00 mov $0x1,%edi
> > ffff82d080637946: e8 ac 4f c7 ff callq ffff82d0802ac8f7
> > <__set_fixmap_x>
> > ffff82d08063794b: 41 b8 00 00 00 00 mov $0x0,%r8d
> > ffff82d080637951: b9 ff ff 00 00 mov $0xffff,%ecx
> > ffff82d080637956: ba 00 00 00 00 mov $0x0,%edx
> > ffff82d08063795b: e8 a0 66 9c 3f callq ffff82d0bfffe000
> > <hv_hcall_page>
> > ffff82d080637960: 66 83 f8 02 cmp $0x2,%ax
> >
> > but it does throw:
> >
> > Difference at .init:00032edf is 0xc0000000 (expected 0x40000000)
> > Difference at .init:00032edf is 0xc0000000 (expected 0x40000000)
> >
> > as a diagnostic presumably from the final link (both with a standard
> > Debian 2.28 binutils, and upstream 2.33 build). I'm not sure what its
> > trying to complain about, as both xen.gz and xen.efi have correctly
> > generated code.
> >
> > Depending on whether they are benign or not, a linker-friendly
> > fix_to_virt() should be all we need to keep these strictly as direct calls.
>
> They're benign in the particular case of them actually resulting
> from relative CALLs, which hence require no relocation to be
> recorded in xen.efi's .reloc section. But they should nevertheless
> be silenced. We've been discussing this on irc, iirc. The absolute
> address used wants to move by 1Gb for the $(ALT_BASE) intermediate
> linking step.
FWIW I don't see those messages with my current code.
Wei.
>
> Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |