On 18/07/18 10:19, Jan Beulich wrote:
>>>> On 18.07.18 at 10:46, <[email protected]> wrote:
>> On 18/07/2018 09:33, Jan Beulich wrote:
>>> --- a/xen/include/asm-x86/spec_ctrl.h
>>> +++ b/xen/include/asm-x86/spec_ctrl.h
>>> @@ -38,6 +38,8 @@ extern uint8_t opt_xpti;
>>>  #define OPT_XPTI_DOM0  0x01
>>>  #define OPT_XPTI_DOMU  0x02
>>>  
>>> +bool xpti_pcid_enabled(void);
>> This still should be inside an CONFIG_PV to avoid scenarios which will
>> compile correctly but fail to link.  It should live in pv/domain.h at
>> which point everything should be fine.
> It was intentional that I didn't move the declaration: Whether the build
> fails at the compile or link stage is irrelevant imo.

It is extremely relevant.

A compiler error points to the file/line here something is wrong, while
a linker error says "something somewhere went wrong", and grepping for
the symbol identified in the error won't be helpful for tracking down
the problem.

Furthermore, with CONFIG_PV not being a usable option yet, there is a
good chance of an error slipping in and going unnoticed until CONFIG_PV
can actually turned off.

>  All we need is that it
> fail at all. I would have moved it if its current placement wasn't again
> very intentional, next to the other XPTI pieces.

You provided a reasonable justification for why the body of this
function should be in pv/domain.c  Therefore, its declaration lives in
pv/domain.h

>
>> With that, Reviewed-by: Andrew Cooper <[email protected]>
> Please clarify whether you can live with the above.

I'm not happy living with a linker error.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to