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

Re: [PATCH 3/3] x86: Delete str()


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 31 Jul 2023 10:25:32 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=j1IOJs6dM+ln2n+eWgja0/unZdHwdc6WKQG2w9VYQzc=; b=V92kkcnAttZxe2gLYPGBxuUaQ9kDeOeihFY2vWvf/dU+kn7pBMWmX3Eg1l18MuwXoOMrEmpuy7P7vocWR7iThNdQLj6bb1VZkkFS+dbh87v7oWOHigUKmQr4dCyVQXWOQMG9ti3VN5KxEtidVOFl6wrHOERrstA+mWPl0DgktjWENIgJbV+T38osDV2vfnfEYCzP7C8I2B7naaQPjwE4hKa5dy66McYXngGsbhzvPEWl6376ucGsaMKbo4nF8grDeylfCl/GhHSWCT9XTFtXKaUErCL36PftkRb9H2D8YEMtoTmR6ls+lnYrDTniUpe820NVOmc9xJDG/CVQSw6WJQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jjj7K7MbQ4nnz5EQZIaa+U93o4kXLOiiCxLoAhmRO4jMf2OB25YlfAaioY3DlNk16RigKseVArghPrrw2inlCIDkE2UYYu6upTBHGdwLnznQ36ced28yhJR63KeZIEGzMgxXfFcsLY5/s7zgoDPTfIpXqJfU6WtG0mK6AdOv4/p59ZTNZjeNmy2qSsXaN6L5xDxQgkHKGqX1V65GMi++gMwjmOXD1wa5y0SOPPUYs+Q99iYfcBSn647OEuvti/e6NQBTWrxExqH8I4qsLb/8u2ION1oet+w8+/yJLV9k4m3/uifFCn3dG+OLt1GhU6CEnlVcNYJ9xBsi9UncxHAjew==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 31 Jul 2023 08:25:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 28.07.2023 21:43, Andrew Cooper wrote:
> This is used in an assertion only, which is somewhat dubious to begin with and
> won't surivive the x86-S work (where TR will become be a NUL selector).

I'm kind of okay with the removal, but I can't read anything like the
above out of the doc. Can you point me at where this is said?

Jan

> Delete it now.  This avoids many cases where as a global symbol, it shadows
> local string variables.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> CC: Wei Liu <wl@xxxxxxx>
> CC: Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>
> CC: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
> ---
>  xen/arch/x86/hvm/svm/svm.c      | 2 --
>  xen/arch/x86/include/asm/desc.h | 9 ---------
>  2 files changed, 11 deletions(-)
> 
> diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
> index 56cb2f61bb75..4d29ad3bc36a 100644
> --- a/xen/arch/x86/hvm/svm/svm.c
> +++ b/xen/arch/x86/hvm/svm/svm.c
> @@ -1614,8 +1614,6 @@ static int _svm_cpu_up(bool bsp)
>      /* Initialize OSVW bits to be used by guests */
>      svm_host_osvw_init();
>  
> -    /* Minimal checking that enough CPU setup was done by now. */
> -    ASSERT(str() == TSS_SELECTOR);
>      svm_vmsave_pa(per_cpu(host_vmcb, cpu));
>  
>      return 0;
> diff --git a/xen/arch/x86/include/asm/desc.h b/xen/arch/x86/include/asm/desc.h
> index 225a864c483e..a1e0807d97ed 100644
> --- a/xen/arch/x86/include/asm/desc.h
> +++ b/xen/arch/x86/include/asm/desc.h
> @@ -238,15 +238,6 @@ static inline void ltr(unsigned int sel)
>      __asm__ __volatile__ ( "ltr %w0" :: "rm" (sel) : "memory" );
>  }
>  
> -static inline unsigned int str(void)
> -{
> -    unsigned int sel;
> -
> -    __asm__ ( "str %0" : "=r" (sel) );
> -
> -    return sel;
> -}
> -
>  #endif /* !__ASSEMBLY__ */
>  
>  #endif /* __ARCH_DESC_H */




 


Rackspace

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