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

Re: [Minios-devel] [UNIKRAFT PATCH v4 1/7] plat: Implement tls stub for arm64


  • To: Santiago Pagani <Santiago.Pagani@xxxxxxxxx>, "minios-devel@xxxxxxxxxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Justin He (Arm Technology China)" <Justin.He@xxxxxxx>
  • Date: Tue, 22 Oct 2019 01:36:33 +0000
  • Accept-language: en-US, zh-CN
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=vXcCOVHIAr/KQlwZXnQpwj42BMsRxYGlG+yTUf0IPhY=; b=LMESdLQFklLdaqPrVrq/9d6+o+N32pYOfJOJL7FIpFmTgg/0veHenUFsn8yE/dsdv09S2xB/wL3cQkyh+P0IKypo4JSpqJgyINOY1WvoF8V0ple0YDi6hBInTx5BVYby1YdGk8K+jSNq8UGKaeA3CbIgaHnDYIYNpqs0/0WtHpOgkXI5tmAqny5tesc43ToSEmDyTWyJ7aFHJ2Nz+hrBK+PFodnwqiZX7c00o8/QFP1bNZgkpDEQSYuI4MdsVyl+02JlNKlUnC9SRIiHnlOZAGnjPz8DfgTtQz8u6viYil/ifWDX3vS237xLKNC3pleH1ZJBUkrD/A12ajZKONohEw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mafB8PNG0zmIqUMSAyH68oJOjaMAv7k1HZVIXhlfS7Uaw22nSGtRn4QWTsLrcsf1wgTiG5OUbLQPuap0SvuyafAOWpyWN6cKUilk4h/sg4vNda3GrQT/RRqvX4utTOEIUaZ2A3alcGQvWPDjqcG9GcmKQssklub+bfQ034nFQ3NzbWkwwi6OXx4IMqRrcs/l4R219l7DC7kOVIqBSouEb9Ung8VUdZuibnRo8+pA5AtpenohfSTU3lRyUzy2PYXVoKKY1OK5dLZbbt4YF3RUjFNHviir5i4BcrCi55jfYFPq454QctcVSAYy9G1oMKKAg8wviIi2VL7UcS4dKrqYSg==
  • Authentication-results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.xenproject.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.xenproject.org; dmarc=none action=none header.from=arm.com;
  • Authentication-results-original: spf=none (sender IP is ) smtp.mailfrom=Justin.He@xxxxxxx;
  • Cc: "Kaly Xin \(Arm Technology China\)" <Kaly.Xin@xxxxxxx>, Simon Kuenzer <simon.kuenzer@xxxxxxxxx>, Julien Grall <Julien.Grall@xxxxxxx>, Sharan Santhanam <Sharan.Santhanam@xxxxxxxxx>
  • Delivery-date: Tue, 22 Oct 2019 01:36:57 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Justin.He@xxxxxxx;
  • Thread-index: AQHVfqXAQ6UccH1/NkqhefLzlN8aM6dk2qMAgAEZ7YA=
  • Thread-topic: [UNIKRAFT PATCH v4 1/7] plat: Implement tls stub for arm64

Hi Santiago

> -----Original Message-----
> From: Santiago Pagani <Santiago.Pagani@xxxxxxxxx>
> Sent: Monday, October 21, 2019 4:46 PM
> To: Justin He (Arm Technology China) <Justin.He@xxxxxxx>; minios-
> devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>; Sharan Santhanam
> <Sharan.Santhanam@xxxxxxxxx>; Julien Grall <Julien.Grall@xxxxxxx>; Kaly
> Xin (Arm Technology China) <Kaly.Xin@xxxxxxx>
> Subject: Re: [UNIKRAFT PATCH v4 1/7] plat: Implement tls stub for arm64
>
> Hi Justin,
>
> Thanks for the patch. See some minor comments inline.
>
> Best,
> Santiago
>
> On 09.10.19, 15:30, "Jia He" <justin.he@xxxxxxx> wrote:
>
>     Without this patch, compiler will report:
>     unikraft/plat/common/include/tls.h:38:2: error: #error "For thread-local
>     storage support, add tls.h for current architecture."
>      #error "For thread-local storage support, add tls.h for current
> architecture."
>     And arm64 kvm plat target will not be built.
>
>     Now I don't remove the pre-compilation #warn as follows in
>     arch/arm/arm64/include/uk/asm/tls.h because I thought arm64 tls
> implementation
>     should use tpidr_el1. I will do it in the future.
>     "#warning Thread-local storage has not been tested on aarch64!"
>
>     Signed-off-by: Jia He <justin.he@xxxxxxx>
>     ---
>      plat/common/include/arm/arm64/tls.h | 37
> +++++++++++++++++++++++++++++
>      plat/common/include/tls.h           |  2 ++
>      2 files changed, 39 insertions(+)
>      create mode 100644 plat/common/include/arm/arm64/tls.h
>
>     diff --git a/plat/common/include/arm/arm64/tls.h
> b/plat/common/include/arm/arm64/tls.h
>     new file mode 100644
>     index 0000000..ed92ab9
>     --- /dev/null
>     +++ b/plat/common/include/arm/arm64/tls.h
>     @@ -0,0 +1,37 @@
>     +/* SPDX-License-Identifier: BSD-3-Clause */
>     +/*
>     + * Copyright (c) 2019, NEC Europe Ltd., NEC Corporation. All rights
> reserved.
> Please fix the copyright by changing "NEC Europe Ltd." To "NEC Laboratories
> Europe GmbH". This is the case for all files.

Sure

>
>     + *
>     + * Redistribution and use in source and binary forms, with or without
>     + * modification, are permitted provided that the following conditions
>     + * are met:
>     + *
>     + * 1. Redistributions of source code must retain the above copyright
>     + *    notice, this list of conditions and the following disclaimer.
>     + * 2. Redistributions in binary form must reproduce the above copyright
>     + *    notice, this list of conditions and the following disclaimer in the
>     + *    documentation and/or other materials provided with the
> distribution.
>     + * 3. Neither the name of the copyright holder nor the names of its
>     + *    contributors may be used to endorse or promote products derived
> from
>     + *    this software without specific prior written permission.
>     + *
>     + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
> CONTRIBUTORS "AS IS"
>     + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> LIMITED TO, THE
>     + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
> PARTICULAR PURPOSE
>     + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
> CONTRIBUTORS BE
>     + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
> OR
>     + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
> PROCUREMENT OF
>     + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
> OR BUSINESS
>     + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
> WHETHER IN
>     + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
> OTHERWISE)
>     + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
> ADVISED OF THE
>     + * POSSIBILITY OF SUCH DAMAGE.
>     + *
>     + * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
>     + */
>     +#ifndef __PLAT_CMN_ARM64_TLS_H__
>     +#define __PLAT_CMN_ARM64_TLS_H__
>     +
>     +#define set_tls_pointer(ptr) do { } while (0)
>     +
>     +#endif /* __PLAT_CMN_X86_TLS_H__ */
> The comment ending the #endif is from the copy-past of X86. Please change
> to "__PLAT_CMN_ARM64_TLS_H__"

Yes, thanks

>
>     diff --git a/plat/common/include/tls.h b/plat/common/include/tls.h
>     index b9176f9..45659d8 100644
>     --- a/plat/common/include/tls.h
>     +++ b/plat/common/include/tls.h
>     @@ -34,6 +34,8 @@
>
>      #if defined(__X86_64__)
>      #include <x86/tls.h>
>     +#elif defined(__ARM_64__)
>     +#include <arm/arm64/tls.h>
>      #else
>      #error "For thread-local storage support, add tls.h for current
> architecture."
>      #endif
>     --
>     2.17.1
>
>

IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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