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

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


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 23 Apr 2021 14:50:41 +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=E3JarhgN2oZ2sKovCT3MqZGx9SBCRc+5Nra94LPLA0Q=; b=ChdhNogEQUwqkYiBQilHxeicUNdWFsOTWMou5g72TyN4zgJ9qHjOyYFMj4RnAK5PNpnEKwuieipiFQ1VK4Nck+AazAQh6qPxLcvVB4es78GnRifGTC6NXdkJ9PLKLt3PdAmUwmgs2PNALlew/rCPBXZzZZRm/INPPVppZcZNE6ecld91NG2xE3IiWjD8IhIdkL0/lNk2l7RkBVjPUEbSjORrQDfmG35y5spl6nwzNqk7gEqrTWqOPVZ95rIqmTNzI92iQmrT57eyAS8whRCxzZ7cUr5KyFNjd+WXv5iAq4zSZw6xRxLv7NxlgFppJxKK95Iqhc2j6u0nmLaumiamHA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TxcrKqQDev7FQICtbdgnUw0h0sGXn+TJfI2m+gW5KdhZtnhG+pRd3j02wQUAc4xqZAN2s/N5BWeU6OHuFyumEy/MZpIh2VyxZSRPUD6gaFchZHMRlJ8snbnsGyzlY/zEpH44tkFDcl3/qhJoHqjlVSU0in/ZTItQvLlbm2G6FaZ200pVifFXWr9mGngtfHGlugSm3hZwbvEHBOvcbLpC5leaD+jURPGd68zLVqSnryxHIoqRXd68JeB0gXlh2vYEux5CpLCZMC/+LQwdhvSTrUHWLimBSVwO3TfuBOLizd2TptygHoY9LyDGltoiP+YgyEoXqV8CrkqaXO4gTFkrwA==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Delivery-date: Fri, 23 Apr 2021 13:50:55 +0000
  • Ironport-hdrordr: A9a23:AOac5q4sDm/69DtAdQPXwVmEI+orLtY04lQ7vn1ZYSd+NuSFis Gjm+ka3xfoiDAXHEotg8yEJbPoexzh3LZPy800Ma25VAfr/FGpIoZr8Jf4z1TbdxHW3tV2kZ 1te60WMrDNJHBnkMf35xS5Gd48wN+BtJuln/va0m0Fd2BXQotn6Bp0DRveN0VwShVPC5ZRLu vh2uNsoT28dXMLKvmhDn4eUOTZ4/HNnpTqYRkJbiRXlTWmpzWu9bL8Dlykzg4TOgk/u4sK3E rkt0jC5qulu+ym0RO07QHuxrlfhdeJ8Ko7OOWikc4QQw+c7TqARIMkYLGauSBwnefH0idQrP DpgzMNe/t+8GnQeGbdm2qc5yDF3Cw143HvjX+06EGTx/DRfz4xB8pfiY8xSHKwgCBBzbIMop 5j5G6Xu4FaChnNhk3Glrz1fipni1aupj4amfMT5kYvILc2UqNbroAU4SpuYfU9NR/9gbpXdd VGMNvR/7J/f1+cchnizxFS6e3pdHEyEhCae1MFq8yY3hNH9UoJsXcw9YgxmGwN+4k6TIQBz+ PYMr5wnLULdcMOa7lhbd1xDPefOyjoe1bhIWiSKVPoGOUuPG/MkYf+5PEQ6PuxcJIF4ZMukP 36IR9lnF93X3irJdyF3ZVN/ByIan66Ry7RxsZX4IU8kqHgRZLwWBfzCWwGoo+FmbEyE8fbU/ G8NNZ9GPn4N1bjHo5PwknXR4RSE38DS8cY0+xLFW6mk4buEMnHp+bbePHcKP7GCjA/QF7yBX MFQXzdP8NFwke3WmLpoRTYVn/3E3aPvq5YIez/xaw+2YINPopDvkw+klKi/PyGLjVEr+gXcS JFUfHau5L+gVPz0XfD7m1vNBYYJF1S+q/c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9HxJsV7o7N2bb8iWLThEW 6s8=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23/04/2021 12:08, Jan Beulich wrote:
> On 23.04.2021 13:04, Andrew Cooper wrote:
>> On 23/04/2021 11:58, Jan Beulich wrote:
>>> On 23.04.2021 12:51, Andrew Cooper wrote:
>>>> 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.
>>> I disagree: It is (for now) just you saying this is bogus. The (ab)use
>>> of the handle infrastructure was there before. You could have sent a
>>> fix long ago, therefore, if you were thinking this needs fixing.
>> I only know it needed fixing because you didn't build test your change
>> in CI.  Don't make it out to be my fault I didn't spot this 6 months ago.
>>
>>> I can
>>> see that you have good intentions, but orthogonal issues shouldn't be
>>> used to block necessary adjustments (and this applies to other pending
>>> build fixes as well).
>> You genuinely regressed things for 32bit HVM guests, with the
>> CONFIG_COMPAT change.
>>
>> The code may have been using inappropriate interfaces to perform its job
>> before, but its actually broken now.
> In which way? COMPAT gets selected by both PV32 and HVM.

Hmm ok - with the select in place, I accept that it is only a problem in
principle.

~Andrew



 


Rackspace

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