From nobody Sat Apr 27 05:26:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1672920159; cv=none; d=zohomail.com; s=zohoarc; b=jEesvr0qk0tTUHyWKVnpiaHhF/whDvfOWiwrgBHxWCpm/Ms5bEq6W795Mbk3tfNH61lfLryYmb2ynn+tyEeFrrfDyxucC53eQHNqPIiVZ9GEfq776EwFHJ3lCyHY1+HoeEvAIUnnywUqXqFoVQRzeamHWScPL05mFU1MIemDJ9k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672920159; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nOuybka6m9Zk5Om7Z7pMNEOSvOvsqAFonp5yEXrOY74=; b=O65hxb7cFgOk/7Pc4fosu6M0VWQVCzkRZFaiFUuezYuKIyCmLo38DiDZ5cJFRVhhAaHsFDVOXSM67Nhj7+TaZQ+0ouZv+R/5m8Y96Jj+4jAJLvyS9xgaRKMf8lyFifi37OC3dn41DiWphFkq6XoYV//c2TdEhbcp0EZN/Tmac8s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1672920159959392.8099112803501; Thu, 5 Jan 2023 04:02:39 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.471847.731866 (Exim 4.92) (envelope-from ) id 1pDOwW-0007Hh-QZ; Thu, 05 Jan 2023 12:01:56 +0000 Received: by outflank-mailman (output) from mailman id 471847.731866; Thu, 05 Jan 2023 12:01:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pDOwW-0007Ha-L9; Thu, 05 Jan 2023 12:01:56 +0000 Received: by outflank-mailman (input) for mailman id 471847; Thu, 05 Jan 2023 12:01:54 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pDOwU-0006u7-I6 for xen-devel@lists.xenproject.org; Thu, 05 Jan 2023 12:01:54 +0000 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [2a00:1450:4864:20::32a]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id be606e7b-8cf0-11ed-91b6-6bf2151ebd3b; Thu, 05 Jan 2023 13:01:53 +0100 (CET) Received: by mail-wm1-x32a.google.com with SMTP id ay40so27872133wmb.2 for ; Thu, 05 Jan 2023 04:01:53 -0800 (PST) Received: from fedora.. ([195.234.76.149]) by smtp.gmail.com with ESMTPSA id x5-20020a05600c21c500b003d9b89a39b2sm2159826wmj.10.2023.01.05.04.01.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 04:01:52 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: be606e7b-8cf0-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nOuybka6m9Zk5Om7Z7pMNEOSvOvsqAFonp5yEXrOY74=; b=RHgAudbgayymqxO19Hdfk4rKzq5iyVG5oIOYA3urYRNss2gMQl40VGFGFfSJqpa7HV XwOcGcl4fW+B7VlnUKLsQF7Vg8ydupY/GwDhgsJYrxysloDOxwQnAEQkt8p1Q2ONv3/A TRVUeHHk54dna433b0q2o47TZDcSpsB2D+7poTLJbv34nL8IAcgnpg3rJh/KJgMvZnTP e1ADeReuU2xwDDRqBOcplSll1FGDcFan+2gbM5UOaazjr4DzLj9xD/hY8GW0C4ICmJMh bUBbxrfU4VK8I68HHFJuImfeLDjwVOOwC/CqbQzQfBiEcY7xOTmI2LCzTboghuDznAue IwdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nOuybka6m9Zk5Om7Z7pMNEOSvOvsqAFonp5yEXrOY74=; b=ftYERKJONKAtpwzXSinemlbCW5c6y0QDZyxRXKzhbI+U+ysSIwsxbtyXlbYgQ+WbNO SuVq3gwjgYcE8gUbZah4G+Uk0mJeQJwUGJ9zIq51wWIG6Scxw+ju5n0ycOoYv6njok/d 7iA7Wcz/MetjwqY50MAWtz5PwizByY6gg+eLWR1DJxq20ec2o7pZh1kUplAcz7bNXQmW ToPOKQm2285YP8ylC7+XDOvTKar8odmdKIu8KYqbTnx+NlzI/SZyj+Nf4Ritv5E3wisz N31n8P8g57Mws54W+s6dJBHq0harEssA7WIacVJBk9qgtdSW0YTJoNsLo1NlyceX73Yq lH6Q== X-Gm-Message-State: AFqh2koNfgmh3hGoeZnsJYcffl17khSnr/Wc6RZmpwEydDN2JoiokfDt 7mRhhgkhW6qj49XVonJuzZ2uypGSldGoHNMN X-Google-Smtp-Source: AMrXdXsj8/JreMZze0R9CwSolXzrA+C8W9QYfrFquPaqB8brVIc7qbccQ7ISl+IDm15WZcdwGEq9eA== X-Received: by 2002:a05:600c:1c27:b0:3cf:a83c:184a with SMTP id j39-20020a05600c1c2700b003cfa83c184amr37045215wms.24.1672920112580; Thu, 05 Jan 2023 04:01:52 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Bob Eshleman , Alistair Francis , Connor Davis , Julien Grall , Anthony PERARD , Andrew Cooper , Stefano Stabellini , Gianluca Guida Subject: [PATCH v4 1/2] arch/riscv: initial RISC-V support to build/run minimal Xen Date: Thu, 5 Jan 2023 14:01:45 +0200 Message-Id: X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1672920160641100003 Content-Type: text/plain; charset="utf-8" The patch provides a minimal amount of changes to start build and run minimal Xen binary at GitLab CI&CD that will allow continuous checking of the build status of RISC-V Xen. Except introduction of new files the following changes were done: * Redefinition of ALIGN define from '.align 2' to '.align 4'. '.align 2' was incorrect choice done previously * ALL_OBJ-y and ALL_LIBS-y were temporary overwritted to produce a minimal hypervisor image otherwise it will be required to push huge amount of headers and stubs for common, drivers, libs etc which aren't necessary for now. * Section changed from .text to .text.header for start function to make it the first one executed. * Rework riscv64/Makefile logic to rebase over changes since the first RISC-V commit. RISC-V Xen can be built by the following instructions: $ CONTAINER=3Driscv64 ./automation/scripts/containerize \ make XEN_TARGET_ARCH=3Driscv64 -C xen tiny64_defconfig $ CONTAINER=3Driscv64 ./automation/scripts/containerize \ make XEN_TARGET_ARCH=3Driscv64 -C xen build RISC-V Xen can be run as: $ qemu-system-riscv64 -M virt -smp 1 -nographic -m 2g \ -kernel xen/xen To run in debug mode should be done the following instructions: $ qemu-system-riscv64 -M virt -smp 1 -nographic -m 2g \ -kernel xen/xen -s -S # In separate terminal: $ riscv64-buildroot-linux-gnu-gdb $ target remote :1234 $ add-symbol-file /xen/xen-syms 0x80200000 $ hb *0x80200000 $ c # it should stop at instruction j 0x80200000 Signed-off-by: Oleksii Kurochko --- Changes in V4: - Remove clean-files target from Makefile as ${TARGET-syms} was simplifed and there is no any sense for clean-files target for now. - Update the commit message. - Code style fixes. --- Changes in V3: - Remove include of from head.S --- Changes in V2: - Update commit message: - Add explanation why ALIGN define was changed. - Add explanation why section of 'start' function was changed. - Rework xen.lds.S linker script. It is mostly based on ARM except ARM-specific sections which have been removed. - Rework in riscv64/Makefile rule $(TARGET)-syms - Remove asm/types.h header as after reworking of riscv64/Makefile it is not needed now. - Remove unneeded define SYMBOLS_DUMMY_OBJ. --- xen/arch/riscv/Makefile | 14 +++ xen/arch/riscv/arch.mk | 4 + xen/arch/riscv/include/asm/config.h | 9 +- xen/arch/riscv/riscv64/Makefile | 2 +- xen/arch/riscv/riscv64/head.S | 4 +- xen/arch/riscv/xen.lds.S | 158 ++++++++++++++++++++++++++++ 6 files changed, 186 insertions(+), 5 deletions(-) create mode 100644 xen/arch/riscv/xen.lds.S diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile index 942e4ffbc1..248f2cbb3e 100644 --- a/xen/arch/riscv/Makefile +++ b/xen/arch/riscv/Makefile @@ -1,2 +1,16 @@ +obj-$(CONFIG_RISCV_64) +=3D riscv64/ + +$(TARGET): $(TARGET)-syms + $(OBJCOPY) -O binary -S $< $@ + +$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) -o $@ + $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ + | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \ + >$(@D)/$(@F).map + +$(obj)/xen.lds: $(src)/xen.lds.S FORCE + $(call if_changed_dep,cpp_lds_S) + .PHONY: include include: diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk index ae8fe9dec7..012dc677c3 100644 --- a/xen/arch/riscv/arch.mk +++ b/xen/arch/riscv/arch.mk @@ -11,3 +11,7 @@ riscv-march-$(CONFIG_RISCV_ISA_C) :=3D $(riscv-marc= h-y)c # -mcmodel=3Dmedlow would force Xen into the lower half. =20 CFLAGS +=3D -march=3D$(riscv-march-y) -mstrict-align -mcmodel=3Dmedany + +# TODO: Drop override when more of the build is working +override ALL_OBJS-y =3D arch/$(TARGET_ARCH)/built_in.o +override ALL_LIBS-y =3D diff --git a/xen/arch/riscv/include/asm/config.h b/xen/arch/riscv/include/a= sm/config.h index e2ae21de61..c6f9e230d7 100644 --- a/xen/arch/riscv/include/asm/config.h +++ b/xen/arch/riscv/include/asm/config.h @@ -1,6 +1,9 @@ #ifndef __RISCV_CONFIG_H__ #define __RISCV_CONFIG_H__ =20 +#include +#include + #if defined(CONFIG_RISCV_64) # define LONG_BYTEORDER 3 # define ELFSIZE 64 @@ -28,7 +31,7 @@ =20 /* Linkage for RISCV */ #ifdef __ASSEMBLY__ -#define ALIGN .align 2 +#define ALIGN .align 4 =20 #define ENTRY(name) \ .globl name; \ @@ -36,6 +39,10 @@ name: #endif =20 +#define XEN_VIRT_START _AT(UL, 0x00200000) + +#define SMP_CACHE_BYTES (1 << 6) + #endif /* __RISCV_CONFIG_H__ */ /* * Local variables: diff --git a/xen/arch/riscv/riscv64/Makefile b/xen/arch/riscv/riscv64/Makef= ile index 15a4a65f66..3340058c08 100644 --- a/xen/arch/riscv/riscv64/Makefile +++ b/xen/arch/riscv/riscv64/Makefile @@ -1 +1 @@ -extra-y +=3D head.o +obj-y +=3D head.o diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S index 0dbc27ba75..990edb70a0 100644 --- a/xen/arch/riscv/riscv64/head.S +++ b/xen/arch/riscv/riscv64/head.S @@ -1,6 +1,4 @@ -#include - - .text + .section .text.header, "ax", %progbits =20 ENTRY(start) j start diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch/riscv/xen.lds.S new file mode 100644 index 0000000000..ca57cce75c --- /dev/null +++ b/xen/arch/riscv/xen.lds.S @@ -0,0 +1,158 @@ +#include + +#undef ENTRY +#undef ALIGN + +OUTPUT_ARCH(riscv) +ENTRY(start) + +PHDRS +{ + text PT_LOAD ; +#if defined(BUILD_ID) + note PT_NOTE ; +#endif +} + +SECTIONS +{ + . =3D XEN_VIRT_START; + _start =3D .; + .text : { + _stext =3D .; /* Text section */ + *(.text.header) + + *(.text.cold) + *(.text.unlikely .text.*_unlikely .text.unlikely.*) + + *(.text) +#ifdef CONFIG_CC_SPLIT_SECTIONS + *(.text.*) +#endif + + *(.fixup) + *(.gnu.warning) + . =3D ALIGN(POINTER_ALIGN); + _etext =3D .; /* End of text section */ + } :text + + . =3D ALIGN(PAGE_SIZE); + .rodata : { + _srodata =3D .; /* Read-only data */ + *(.rodata) + *(.rodata.*) + *(.data.rel.ro) + *(.data.rel.ro.*) + + VPCI_ARRAY + + . =3D ALIGN(POINTER_ALIGN); + _erodata =3D .; /* End of read-only data */ + } :text + + #if defined(BUILD_ID) + . =3D ALIGN(4); + .note.gnu.build-id : { + __note_gnu_build_id_start =3D .; + *(.note.gnu.build-id) + __note_gnu_build_id_end =3D .; + } :note :text + #endif + _erodata =3D .; /* End of read-only data */ + + . =3D ALIGN(PAGE_SIZE); + .data.ro_after_init : { + __ro_after_init_start =3D .; + *(.data.ro_after_init) + . =3D ALIGN(PAGE_SIZE); + __ro_after_init_end =3D .; + } : text + + .data.read_mostly : { + *(.data.read_mostly) + } :text + + . =3D ALIGN(PAGE_SIZE); + .data : { /* Data */ + *(.data.page_aligned) + . =3D ALIGN(8); + __start_schedulers_array =3D .; + *(.data.schedulers) + __end_schedulers_array =3D .; + + HYPFS_PARAM + + *(.data .data.*) + CONSTRUCTORS + } :text + + . =3D ALIGN(PAGE_SIZE); /* Init code and data */ + __init_begin =3D .; + .init.text : { + _sinittext =3D .; + *(.init.text) + _einittext =3D .; + . =3D ALIGN(PAGE_SIZE); /* Avoid mapping alt insns executab= le */ + } :text + . =3D ALIGN(PAGE_SIZE); + .init.data : { + *(.init.rodata) + *(.init.rodata.*) + + . =3D ALIGN(POINTER_ALIGN); + __setup_start =3D .; + *(.init.setup) + __setup_end =3D .; + + __initcall_start =3D .; + *(.initcallpresmp.init) + __presmp_initcall_end =3D .; + *(.initcall1.init) + __initcall_end =3D .; + + LOCK_PROFILE_DATA + + *(.init.data) + *(.init.data.rel) + *(.init.data.rel.*) + + . =3D ALIGN(8); + __ctors_start =3D .; + *(.ctors) + *(.init_array) + *(SORT(.init_array.*)) + __ctors_end =3D .; + } :text + . =3D ALIGN(POINTER_ALIGN); + __init_end =3D .; + + .bss : { /* BSS */ + __bss_start =3D .; + *(.bss.stack_aligned) + . =3D ALIGN(PAGE_SIZE); + *(.bss.page_aligned) + . =3D ALIGN(PAGE_SIZE); + __per_cpu_start =3D .; + *(.bss.percpu.page_aligned) + *(.bss.percpu) + . =3D ALIGN(SMP_CACHE_BYTES); + *(.bss.percpu.read_mostly) + . =3D ALIGN(SMP_CACHE_BYTES); + __per_cpu_data_end =3D .; + *(.bss .bss.*) + . =3D ALIGN(POINTER_ALIGN); + __bss_end =3D .; + } :text + _end =3D . ; + + /* Section for the device tree blob (if any). */ + .dtb : { *(.dtb) } :text + + DWARF2_DEBUG_SECTIONS + + DISCARD_SECTIONS + + STABS_DEBUG_SECTIONS + + ELF_DETAILS_SECTIONS +} --=20 2.38.1 From nobody Sat Apr 27 05:26:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1672920159; cv=none; d=zohomail.com; s=zohoarc; b=kvLblXkBSQkzjx4CVxn/jVCG7K4nHX6DqvvCjTSl6atTQ9hW7HyxJB6qszhHyqyqHh4U7H/Bsjj1uICU3mEi8Yu10DWH4Y9M8Lcj5vmxdiy0djTna1CsCkDNmP3IDV9EAPuwXNQTPgGceNalBEmFLop7oEzy457VDYSsI+k041g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672920159; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HEdE610llDLMp8O4DeyVRrmQCHhD1SKsTN47twxNoiI=; b=nACaDvMpQs8aLAoszLJ6LDn6xIEVQghWVZoAS4zn2TFCCsQz58tiuOBamhXNiFYLbf97cshDPrSRaMBVEStgNZOxFFIvs1PzSPkiAB74PRcAB5oaDZgeShVqXi88CbI23nMT+U2lta0jSMV+pUc7witlT6bEFOewYk3SXn0UeN0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1672920159096654.2029741375645; Thu, 5 Jan 2023 04:02:39 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.471848.731876 (Exim 4.92) (envelope-from ) id 1pDOwY-0007Xa-17; Thu, 05 Jan 2023 12:01:58 +0000 Received: by outflank-mailman (output) from mailman id 471848.731876; Thu, 05 Jan 2023 12:01:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pDOwX-0007XQ-TP; Thu, 05 Jan 2023 12:01:57 +0000 Received: by outflank-mailman (input) for mailman id 471848; Thu, 05 Jan 2023 12:01:56 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pDOwW-00071H-ES for xen-devel@lists.xenproject.org; Thu, 05 Jan 2023 12:01:56 +0000 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [2a00:1450:4864:20::329]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id bf1eaf22-8cf0-11ed-b8d0-410ff93cb8f0; Thu, 05 Jan 2023 13:01:54 +0100 (CET) Received: by mail-wm1-x329.google.com with SMTP id k26-20020a05600c1c9a00b003d972646a7dso1115571wms.5 for ; Thu, 05 Jan 2023 04:01:54 -0800 (PST) Received: from fedora.. ([195.234.76.149]) by smtp.gmail.com with ESMTPSA id x5-20020a05600c21c500b003d9b89a39b2sm2159826wmj.10.2023.01.05.04.01.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 04:01:53 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: bf1eaf22-8cf0-11ed-b8d0-410ff93cb8f0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HEdE610llDLMp8O4DeyVRrmQCHhD1SKsTN47twxNoiI=; b=QFErldNCO2mrk5LL8zlYwXziQNBpOK+PphWvyCkUgYROLNMOs7C9I4qr/uDXg5kYhj 8kqTI4rfGYYbB32LMUgGcX/Sx5/zHTuOYtvFe5kGHfwxbkswYskCJmkRk3h2RF4G3LfN A6gNjbSnsFpr7RValUIU12j34ckg6WaXbdMa0R0yZeeXPv24mhxvhY1avQsi5lGDKdLz H35Up31QgjmueDcNvKW+BIB9KjYx3MqtmyN8P/sqJLapiXBz0f4RTSy8YOkyTHcFXBWr O6LmVK76Ww0wRoiFONMqNSm3C2i539AjjvecNwt5f+LnsONlBxDAdkIhGJ7LHQjimAHe crrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HEdE610llDLMp8O4DeyVRrmQCHhD1SKsTN47twxNoiI=; b=c0waLa+KnFc3tPsXKrXG/AToea9LFdoLugrYQuOufxRqM7bQdhKfTZRqHLddlj8n9Y ZlAH2M5dqLKcejVX92vyz8wyZMiC6qAtHE6VzhY6eNbr4zSZySQA8DSi9w0H8sFg4sMm c1jMfHJhjHWktZJSQUuTwg1+mH1DWxoC4hjA5drJ5sKnrYZYumfAoQ15jSPbRVypBC3U MPkS/0jlVCPLy/BgOzK0YwkJePL9/mlCKSN7oUi18lOsV/2vHeTibFLkWq+igtwCvkME MYmN1xxkKjA/4u9pI+UCMg69q6WYgk8MB4xaPfTmDfcMQq2X2H4UflHgxgh8LtLSm9CE 1dJQ== X-Gm-Message-State: AFqh2krEUHOMb6CLH8JcQ3aQvAbx/urSTSS/IvhWKoriwrI7aeRmXcbl aO4caCaw1i3OQ8EIKotaLoQvrFI63mcV7zK+ X-Google-Smtp-Source: AMrXdXtCSkkQJPSIaON/PqlUvKP0j+OCC8GRjx3CUMUnB0kYwufcQ54q3I7Z7/HiR3oPi6kFNsMgNQ== X-Received: by 2002:a05:600c:3ac3:b0:3d1:cfcb:7d19 with SMTP id d3-20020a05600c3ac300b003d1cfcb7d19mr43668618wms.32.1672920113643; Thu, 05 Jan 2023 04:01:53 -0800 (PST) From: Oleksii Kurochko To: xen-devel@lists.xenproject.org Cc: Oleksii Kurochko , Doug Goldstein , Stefano Stabellini , Andrew Cooper , Gianluca Guida , Alistair Francis Subject: [PATCH v4 2/2] automation: add RISC-V 64 cross-build tests for Xen Date: Thu, 5 Jan 2023 14:01:46 +0200 Message-Id: <7d9bf454d056180376031aaf862963036a46d1e5.1672912316.git.oleksii.kurochko@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1672920160496100001 Content-Type: text/plain; charset="utf-8" Add build jobs to cross-compile Xen-only for RISC-V 64. Signed-off-by: Oleksii Kurochko Acked-by: Alistair Francis --- Changes in V4: - Add RISCV RANDCONFIG jobs - Remove unnecessary comments --- Changes in V2: - Add HYPERVISOR_ONLY to RISCV jobs because after rebase on top of the patch series "CI: Fixes/cleanup in preparation for RISCV" it is required to set HYPERVISOR_ONLY in build.yaml --- automation/gitlab-ci/build.yaml | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.y= aml index 43dbef8aba..6784974619 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -172,6 +172,33 @@ variables: <<: *gcc =20 +.riscv64-cross-build-tmpl: + <<: *build + variables: + XEN_TARGET_ARCH: riscv64 + tags: + - x86_64 + +.riscv64-cross-build: + extends: .riscv64-cross-build-tmpl + variables: + debug: n + +.riscv64-cross-build-debug: + extends: .riscv64-cross-build-tmpl + variables: + debug: y + +.gcc-riscv64-cross-build: + extends: .riscv64-cross-build + variables: + <<: *gcc + +.gcc-riscv64-cross-build-debug: + extends: .riscv64-cross-build-debug + variables: + <<: *gcc + # Jobs below this line =20 archlinux-gcc: @@ -619,6 +646,35 @@ alpine-3.12-gcc-debug-arm64-boot-cpupools: EXTRA_XEN_CONFIG: | CONFIG_BOOT_TIME_CPUPOOLS=3Dy =20 +# RISC-V 64 cross-build +riscv64-cross-gcc: + extends: .gcc-riscv64-cross-build + variables: + CONTAINER: archlinux:riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + HYPERVISOR_ONLY: y + +riscv64-cross-gcc-debug: + extends: .gcc-riscv64-cross-build-debug + variables: + CONTAINER: archlinux:riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + HYPERVISOR_ONLY: y + +riscv64-cross-gcc-randconfig: + extends: .gcc-riscv64-cross-build + variables: + CONTAINER: archlinux:riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + RANDCONFIG: y + +riscv64-cross-gcc-debug-randconfig: + extends: .gcc-riscv64-cross-build-debug + variables: + CONTAINER: archlinux:riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + RANDCONFIG: y + ## Test artifacts common =20 .test-jobs-artifact-common: --=20 2.38.1