|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] x86/oprof: fix !HVM && !PV32 build
On 16.04.2021 15:41, Andrew Cooper wrote:
> On 16/04/2021 09:16, Jan Beulich wrote:
>> clang, at the very least, doesn't like unused inline functions, unless
>> their definitions live in a header.
>>
>> Fixes: d23d792478 ("x86: avoid building COMPAT code when !HVM && !PV32")
>> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> I agree this will fix the build. However, looking at the code, I'm not
> sure the original CONFIG_COMPAT was correct. In particular, ...
>
>>
>> --- a/xen/arch/x86/oprofile/backtrace.c
>> +++ b/xen/arch/x86/oprofile/backtrace.c
>> @@ -43,6 +43,7 @@ dump_hypervisor_backtrace(struct vcpu *v
>> return head->ebp;
>> }
>>
>> +#ifdef CONFIG_COMPAT
>> static inline int is_32bit_vcpu(struct vcpu *vcpu)
>> {
>> if (is_hvm_vcpu(vcpu))
>
> ... this chunk of logic demonstrates that what oprofile is doing isn't
> related to the Xen ABI in the slightest.
>
> I think OProfile is misusing the guest handle infrastructure, and
> shouldn't be using it for this task.
I'm afraid I consider this something for another day. Both the
original #ifdef and the one getting added here are merely
measures to get things to build.
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |