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

Re: [PATCH] x86/shim: fix build when !PV32


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 7 May 2021 10:21:05 +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=tyRXKoIuo4CEC3Qf6JH6q7bcHQSVweAvWdr912tnoNE=; b=ddoHkrT16YTsxvo/aVbX5PlpZxBUYkHVt5PLHOZsPPo+oYTzqXzwKi6eEoOxHG60gnMoA5gN40vv1PwZe+dReydGgp9za/PKaVceIlNmMl7zH6b/cCHfagfDbHJ2cLBdtm6AsSVYZHRCBvVTeNcZaCshxBXFMm52GPWlh8M1EiBClOm2WXfJFBoqDC1B3F1si50kX+0+HL52zTxcqeLDK5n73Pg7eBCUpI0bjFYft+9V1f9q2fSRtN24/khoRT+JmfFrjedoumUIPh3LwCL1EYDWtxqWBpkC1KSKtiB3FlcwyDNPw/Ls+87M2EJnN4bpr9OwiWSxFa0HIbe+rHlxWA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IJkdUsbzg+SsCm99pWdzJ1IOJH/c+IVjAWXJVjPA4eA7W3fBfLBVwMhq63+e0S0LQDi+jU8pphYnrhWuKWEfISuwM+dy9/HmdTcpYyteEshdM8vQYCw7hjgTtAomfgpjUf58eTmNYy/ot4acbb01MkxRw5IiWYSxN4SNsrWchkRnjEaH0N+dgFLdvNjcuZc8bIkR/Db4AP4lTkYTt0jDawi5CZYi7m9qVsfGyCYXh9Z8UT4TSOvF+say/+52l7+c9pCqUasS3YM6vCjfv2SX2ejy4VqRIjR/a7CGqi/+PgOdvn2fOcq20hOw/AYGxoNPNIAuo7C4szYClxMyLaS8zg==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 07 May 2021 08:21:24 +0000
  • Ironport-hdrordr: A9a23:mBU9eqNziMLnbMBcTjujsMiBIKoaSvp037BK7S1MoNJuEvBw9v re+MjzsCWftN9/Yh4dcLy7VpVoIkmskKKdg7NhXotKNTOO0AeVxelZhrcKqAeQeREWmNQ96U 9hGZIOdeEZDzJB/LrHCN/TKade/DGFmprY+9s31x1WPGZXgzkL1XYDNu6ceHcGIjVuNN4CO7 e3wNFInDakcWR/VLXAOpFUN9Kz3uEijfjdEGY7OyI=
  • Ironport-sdr: 75PaO44ZiXGJaDLGySM59f5Pr15U3xQjgA3fFaPxBVC7T2cnkB2enReycUdfTBoBIMxCbs0tZu RwrKi+WwRbHA2FHZgNNWJ4VJvuXwsRKM8WZma4JTmeikEHpwMVQCHDC+dr2+qxn0mBPUDYp+3Q rBaCcVGDlIZGv5+2MBkAP/fvlT/fhQ1dfZYGM5OweJyCHJaOLtX2pNEA81MZmrpVZ3iwywsBzE kwJ+xeBGWRA6+QvXgt5+B1Q8w4NBhrlsyaHf5t9IG+cRlaUeftPd9lsULweghyZiaocOePHii7 w0M=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, May 07, 2021 at 08:22:38AM +0200, Jan Beulich wrote:
> In this case compat headers don't get generated (and aren't needed).
> The changes made by 527922008bce ("x86: slim down hypercall handling
> when !PV32") also weren't quite sufficient for this case.
> 
> Try to limit #ifdef-ary by introducing two "fallback" #define-s.
> 
> Fixes: d23d792478db ("x86: avoid building COMPAT code when !HVM && !PV32")
> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> --- a/xen/arch/x86/pv/shim.c
> +++ b/xen/arch/x86/pv/shim.c
> @@ -34,8 +34,6 @@
>  #include <public/arch-x86/cpuid.h>
>  #include <public/hvm/params.h>
>  
> -#include <compat/grant_table.h>
> -
>  #undef virt_to_mfn
>  #define virt_to_mfn(va) _mfn(__virt_to_mfn(va))
>  
> @@ -300,8 +298,10 @@ static void write_start_info(struct doma
>                                            &si->console.domU.mfn) )
>          BUG();
>  
> +#ifdef CONFIG_PV32
>      if ( compat )
>          xlat_start_info(si, XLAT_start_info_console_domU);
> +#endif

Would it help the compiler logic if the 'compat' local variable was
made const?

I'm wondering if there's a way we can force DCE from the compiler and
avoid the ifdefs around the usage of compat.

Thanks, Roger.



 


Rackspace

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