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

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


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 23 Apr 2021 11:50:32 +0200
  • 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=mOJzEjtpqvis25rro5Y2UDaMlNBuZsFuM+ITUJoKAi4=; b=Y9pwjyFwnOM4ZFHCMEvNDz2gXPm/aNCcievoNZnBDpyrW8FhBwc8UOPGevMasRo1rSl/LW5oXuSC/qKYKP37qcoG+1ugULCBeV5QF7DwMEan4vzv+79Gm31BKWE2jjlWFPME+yLpQ+qsbcVrxuJFNvv9m+HLFS7rj5dTYhoZCdCvmMEllllOcmnMk73hfASCqFv3amh9+a+MwJip7uUM0vLLMPqM42NAIEK49R2KsCbd6XdNhOf9x+uRB0tmLpbOyYGXKsvktUj8OnsWIjefP6j2Qb6BuztMVo1bkTTLc5O3/3Dj8MGHeXIJkmycc37mF1Rr6KgBowYlHj9q3xLdhw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ei3y8NRjmzYarosLsavSCeQ6n+ikbfKq4WnP8avtUady15C4IOigcDQ7lrnGCjdI18sCMFme7ChpKYsp7Z9WAmefAYCLjBAB36Qq0UBt63i372vzzJgXI5aeVVx3QaXk/6TheapVazbndPwlnSD0XttiZPKVyQ23OVIwDLxyKnrW1UQgqVcckvOL2rhaOHWjwQJX9zpZ6RaJRMWKQx2b7gR8Inq6E2jh6Pvl9NJy68aMMtCkv5UAEvcl4+sz6L3qo0At9tRMJBPMbuGMwDOot1Eggo34ZTDKLiAmeVjMbIBzjpwrxmRTQ0GnEtu4ATJdIHEMrqBdpm93SrSB0UJKxA==
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 23 Apr 2021 09:50:47 +0000
  • Ironport-hdrordr: A9a23:adMPeq9Bm28+jZmkRGRuk+FqcL1zdoIgy1knxilNYDRvWIixi9 2ukPMH1RX9lTYWXzUalcqdPbSbKEmzybdc2qNUGbu5RgHptC+TLI9k5Zb/2DGIIULD38Zn/+ Nbf6B6YeedMXFTkdv67A6kE9wp3dmA9+SSif3Dymp2JDsLV4hLxW5Ce2CmO2dxQxRLAod8OZ qH/8xcpyehf3N/VLXHOlAuWe/fq9rX0K/8aRkdCBI9rCWIhzWk6Ln1eiLoois2eTVJ3Lsk7C z5gxX0j5/Tyc2T5z398yvo75pQkMb80dcrPq2xo+UcNzmEsHfMWK1PQLuH1QpFxN2HyFFvq9 XUpgdlAsIb0QKvQkiQgT/Anzbtyywv7XiK8y7qvVLGrdbiTDw3T+pt7LgpCifx0EYrsNFi3K 8j5Qvw3PA7fHCw/lWJ2/HyWx5njUayq3Y5+NRj9EB3aocCdKRX6bUW4UI9KuZxIAvB9IslHO NyZfusncp+TFXyVQG/gkBfhPaoXng1Ay6cRFkDtsG/w1Ft7QFE5npd68oFknga8pUhD7FC+u TfK6xt0IpDV8kMcMtGdag8aPryLlaIbQPHMWqUL1iiPKYbO0jVo5qyxLku/umldLEB0ZNaou WObHpo8UoJP27+A8yH25NGtjrXRn+mYDjrwsZCo7Bkp7zVXtPQQG6+YWFrt/Hlj+QUA8XdVf r2EolRGeXfIWznHpsM9xHiWqNVNWIVXKQuy5YGcmPLhviOBpzht+Tdfv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f7XS3Pb9mqhfBW4VPyvOgtsHvlVv2Tn82Iw5ETh E7C5fgJPus/SE90cp1D/blmWom3I91UrSayJT5G/I13l9k4FYCJftf7dffQM8y6zGAoyZEg2oY j8sID0fDMk3bOmlUf/cVGFLP7Npk/HKH+O22lQzh3IWm6NbRjtCguEcmzSX53dnlfKvveam+qA G3w=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

Thanks, Roger.



 


Rackspace

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