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

Re: [Xen-devel] [PATCH v6 06/11] x86/hyperv: provide Hyper-V hypercall functions



On 03.02.2020 14:31, Wei Liu wrote:
> On Mon, Feb 03, 2020 at 02:26:24PM +0100, Jan Beulich wrote:
>> On 31.01.2020 18:49, Wei Liu wrote:
>>> --- a/xen/arch/x86/mm.c
>>> +++ b/xen/arch/x86/mm.c
>>> @@ -375,9 +375,11 @@ void __init arch_init_memory(void)
>>>      }
>>>  #endif
>>>  
>>> -    /* Generate a symbol to be used in linker script */
>>> +    /* Generate symbols to be used in linker script */
>>>      asm ( ".equ FIXADDR_X_SIZE, %P0; .global FIXADDR_X_SIZE"
>>>            :: "i" (FIXADDR_X_SIZE) );
>>> +    asm ( ".equ HV_HCALL_PAGE, %P0; .global HV_HCALL_PAGE"
>>> +          :: "i" (__fix_x_to_virt(FIX_X_HYPERV_HCALL)) );
>>
>> Would this even build without CONFIG_HYPERV_GUEST? In any event
>> it doesn't belong here, but should go in a Hyper-V specific
>> file.
>>
> 
> Good catch. When I did my full build tests it was done with my previous
> version.
> 
> I can move this to hyperv.c.
> 
>> Seeing you now need two of these, how about macro-izing the
>> construct?
> 
> What name would you suggest? I'm thinking about GEN_XEN_LDS_SYMBOL.

In principle this isn't limiting things to use by xen.lds, so
I'd prefer to not encode such in the name. asm_constant()? Or
all caps if so preferred by others?

> And presumably I should put it in xen/lib.h?

Would be nice to have it there, but I'm afraid this is against
what gcc documents. Hence if anything the P would need to be
abstracted away as a per-arch thing. If you don't want to go
this far, asm_defns.h might be the best fit among the x86
headers.

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®.