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

Re: [Xen-devel] [PATCH v5 08/12] x86/hyperv: provide Hyper-V hypercall functions



On 31.01.2020 15:20, Wei Liu wrote:
> On Fri, Jan 31, 2020 at 03:12:50PM +0100, Jan Beulich wrote:
>> On 30.01.2020 13:28, Wei Liu wrote:
>>> On Thu, Jan 30, 2020 at 01:08:07PM +0100, Roger Pau Monné wrote:
>>>>
>>>>> +}
>>>>> +
>>>>>  /*
>>>>>   * Local variables:
>>>>>   * mode: C
>>>>> diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
>>>>> index 97f9c07891..8e02b4c648 100644
>>>>> --- a/xen/arch/x86/xen.lds.S
>>>>> +++ b/xen/arch/x86/xen.lds.S
>>>>> @@ -329,6 +329,10 @@ SECTIONS
>>>>>    efi = .;
>>>>>  #endif
>>>>>  
>>>>> +#ifdef CONFIG_HYPERV_GUEST
>>>>> +  hv_hcall_page = ABSOLUTE(__fix_x_to_virt(1));
>>>>
>>>> I assume there's no way to use FIX_X_HYPERV_HCALL because it's an
>>>> enum?
>>>>
>>>
>>> Yes.
>>>
>>> And the trick to generate a symbol didn't work either.
>>
>> I guess I need an explanation here. Aiui you don't really need
>> the definition to be in the linker script, and it could as well
>> be in e.g. assembly code. How does the same .equ approach not
>> work in this case?
>>
> 
> In commit message:
> 
> mm.c:5736:5: error: invalid 'asm': operand is not a condition code,
> invalid operand code 'c'
>                asm ( ".equ HV_HCALL_PAGE, %c0; .global HV_HCALL_PAGE"

But this lacks the other half of the asm().

> ISTR you once mentioned in IRC that there is a way around this (with a
> new modifier / qualifier), but I don't have the log anymore.

And I think we did say that we didn't want to go too far with
using gcc internals. IOW I think trying different modifiers is
out of question now (it was -%n0 iirc), but getting past gcc
not recognizing the constant as being a constant may still be
a viable route.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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