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

Re: [PATCH] x86/oprof: fix !HVM && !PV32 build


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 23 Apr 2021 11:51:50 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UBJpmAZmMOhKvscwO6+sExro1lF4MvvaZXvITJuDbcs=; b=jSijJE7JxQuDzavjYV3xoFXR66H5OlmhUZYUqAbyYuj3TjYehh9nucAo3QojlN7OAUQ2OQxAI8hqxTVQhzJB5YnjeNxBunU2TfH99HpZlAq1LNQ8aTUGpVEm1op4jRw4w2WhMeCXcOxehcUtbWNA9XER/u9MOsbc3oXC7IrNv4TZXIqOY+QFQmwXX4qo6ei2iFOLHsMYyTmQv6/z7VMf/Nuagk+agU7PfXNOanJ/SHMAD2AzahQclJyChDrL0bOgAexYKUzVhFf7KtC0NrBCwSpAAtch68okTaCJ1uELdSTHNmg5M5nFZAm1wh8iSGNBhGsaBPM1k2VKgtsLQzt4Ng==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f1+IENsqJ+rTdKqqMdfWkXioZtRY/Rx5Bx4VIJV/kJ9L+hJojHqWow26A9jfSSGEYTV3wd4dK/a2UtsgS9boV98jrFCfy9pjx5taiS9RIhkbQEkX/sWHV0skEEW7ndlZ2aXSINJ+DbACJwmYV+NKwRgOPUZE8LSRjdJV5VPCqTpjp5dzw8ly0qxfKLP7RFWoJ9COn2hGvAbtbXNYjK7A32ltP+AKVXJHXj4jADUY/Q0T7sSTswzRQ9I7RNxgcdB0KdJeCHbS6G+7tUW5PZcomtQH7T3OGrN6VcbZW1ehfeWJoE0baxPadCO+EvqNyLIOKTHfxWsdrYKE4Rq8tJNhNQ==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 23 Apr 2021 10:52:02 +0000
  • Ironport-hdrordr: A9a23:EYmOPaGCdhimO8dwpLqFYZTXdLJzesId70hD6mlYcjYQWtCEls yogfQQ3QL1jjFUY307hdWcIsC7LE/03aVepa0cJ62rUgWjgmunK4l+8ZDvqgeLJwTXzcQY76 tpdsFFY+HYJVJxgd/mpCyxFNg9yNeKmZrY/tv25V0Fd3AIV4hL6QBlBgGHVmh/QwdbDZQ0fa DsnPZvjTymZHgRc4CHFmAINtKz7eHjubDHRVo9BxAh4BSTlj/A0tLHOjWRwxt2aUIp/Z4M6m 7A+jaZ2oyCtLWBxgbYxyvv6f1t6aPc4/9iIODJtcQPMDXrjW+TFclccpmPpio8ru3qyHtCqq irnz4aM85+62zccwiOyHODtTXI6zog52TvzlWVmxLY0LXEbQgnAMlMj58xSGq612Mcvcpx2K 8O/2WVu4s/N2KloA3B5sPFXxwvq0ysoXBKq593s1VjV+IlCIN5nMg6xgd4AZ0AFCX15MQMC+ 91FvzR4/5QbBezc23ZlnMH+q3iYl0DWjO9BmQSsM2c1DZb2FpjyVED+cAZlnAcsLogVph/4f jeOKgArsABcuYmKYZGQMsRS8q+DWLABTjWNniJHFjhHKYbf1XAtoDw+7dwwO2xYpQHwN8Tlf 36IRJlnF93X3irJdyF3ZVN/ByIan66Ry7RxsZX4IU8tab7QLbtLC2fWFEjm8atuJwkc47mcs f2HKgTL+7oLGPoF4oM9Rb5QYNuJX4XV9BQuttTYSPNnuv7bqnR8sDLev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4tF8DoDGAqx+nsVzoo0 UGPOE4fF8n/NKq6IaOeFim0PDIo2y2zogICFYyc1bmTrjoCbq9p5cM66AV4XACEIgDBFM2mWLW jooBguxNNjr5/n+vrzUaQcyGXnTaeYwyQOl/hghcjA3qR6ZxMv9CxiyBT6E3jaRwN02XZgK/Na EMU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23/04/2021 10:50, Roger Pau Monné wrote:
> On Fri, Apr 16, 2021 at 04:20:59PM +0200, Jan Beulich wrote:
>> 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.
> Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>
> Without entering on the debate whether CONFIG_COMPAT is the correct
> conditional to use it's not making the issue any worse, and it will
> allow to unblock the build. We can discuss about the CONFIG_COMPAT
> stuff later.

I disagree.  Fixing this less effort than the time wasted arguing about
fixing it.

But if you are going to insist on not fixing it, and putting in a patch
like this, then at a minimum, it needs to include a TODO comment stating
that the use of CONFIG_COMPAT is bogus and needs fixing.

~Andrew



 


Rackspace

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