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

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



Reviewed-by: Santiago Pagani <santiago.pagani@xxxxxxxxx>

Hi Justin,

Thanks fort he patch. It looks good.

Minor comment for next time (I'll fix it during upstream, no need for a new 
version), about the copyright, I meant that it should read "NEC Laboratories 
Europe GmbH" and not "NEC Europe Ltd.", however the "NEC Corporation" should 
stay there. So it should actually read "Copyright (c) 2019, NEC Laboratories 
Europe GmbH, NEC Corporation. All rights reserved."

Best,
Santiago


On 22.10.19, 03:53, "Minios-devel on behalf of Jia He" 
<minios-devel-bounces@xxxxxxxxxxxxxxxxxxxx on behalf of 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>
    ---
     arch/arm/arm64/include/uk/asm/tls.h |  2 +-
     plat/common/include/arm/arm64/tls.h | 37 +++++++++++++++++++++++++++++
     plat/common/include/tls.h           |  2 ++
     3 files changed, 40 insertions(+), 1 deletion(-)
     create mode 100644 plat/common/include/arm/arm64/tls.h
    
    diff --git a/arch/arm/arm64/include/uk/asm/tls.h 
b/arch/arm/arm64/include/uk/asm/tls.h
    index 829334e..6cc23f1 100644
    --- a/arch/arm/arm64/include/uk/asm/tls.h
    +++ b/arch/arm/arm64/include/uk/asm/tls.h
    @@ -2,7 +2,7 @@
     /*
      * Authors: Florian Schmidt <florian.schmidt@xxxxxxxxx>
      *
    - * Copyright (c) 2019, NEC Europe Ltd., NEC Corporation. All rights 
reserved.
    + * Copyright (c) 2019, NEC Laboratories Europe GmbH. All rights reserved.
      *
      * Redistribution and use in source and binary forms, with or without
      * modification, are permitted provided that the following conditions
    diff --git a/plat/common/include/arm/arm64/tls.h 
b/plat/common/include/arm/arm64/tls.h
    new file mode 100644
    index 0000000..80c0dc3
    --- /dev/null
    +++ b/plat/common/include/arm/arm64/tls.h
    @@ -0,0 +1,37 @@
    +/* SPDX-License-Identifier: BSD-3-Clause */
    +/*
    + * Copyright (c) 2019, NEC Laboratories Europe GmbH. All rights reserved.
    + *
    + * 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_ARM64_TLS_H__ */
    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
    
    
    _______________________________________________
    Minios-devel mailing list
    Minios-devel@xxxxxxxxxxxxxxxxxxxx
    https://lists.xenproject.org/mailman/listinfo/minios-devel

_______________________________________________
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®.