From patchwork Mon Aug 15 15:49:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Rzeszutek Wilk X-Patchwork-Id: 9281489 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4A512600CB for ; Mon, 15 Aug 2016 15:52:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AF3028D52 for ; Mon, 15 Aug 2016 15:52:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F9D328D62; Mon, 15 Aug 2016 15:52:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 61A5828D52 for ; Mon, 15 Aug 2016 15:52:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZK8Q-0004rx-0p; Mon, 15 Aug 2016 15:49:06 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZK8O-0004rp-Ez for xen-devel@lists.xenproject.org; Mon, 15 Aug 2016 15:49:04 +0000 Received: from [85.158.137.68] by server-3.bemta-3.messagelabs.com id AF/C6-23620-F64E1B75; Mon, 15 Aug 2016 15:49:03 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplleJIrShJLcpLzFFi42K5GHrNRTfvycZ wgzWzTC2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oz/HyaxFzw2rriyso+pgfGvdhcjF4eQwHRG iT3f37CAOCwCy1gl9mzewwjiSAgcYpXYcKIfyOEEcmIkJt1rY4WwqyWa/u5kAbGFBJQktkx+z Agx6i+jxNZ7Z8ESwgJ6EpO/3QZrZhFQlWhY2QjWzCagL/F07TVmEFtEQF3iz4UJYM3MAu2MEr 867jFCNJtLvF20l6mLkYODV8BSYunGRIhlpRLzWv+zgdi8AoISJ2c+AdvFLKAlcePfS7ByZgF pieX/OEDCnALWEu9/HgZbKyqgLNEw4wHzBEaRWUi6ZyHpnoXQvYCReRWjRnFqUVlqka6RmV5S UWZ6RkluYmaOrqGBsV5uanFxYnpqTmJSsV5yfu4mRmAE1DMwMO5gbNjrd4hRkoNJSZR35sSN4 UJ8SfkplRmJxRnxRaU5qcWHGGU4OJQkeO0eA+UEi1LTUyvSMnOAsQiTluDgURLhNQBJ8xYXJO YWZ6ZDpE4x2nNs+X1tLRPHlgU3gOS2qfeA5J8Nk68wCbHk5eelSonz8oK0CYC0ZZTmwQ2FpY5 LjLJSwryMDAwMQjwFqUW5mSWo8q8YxTkYlYR5LUCm8GTmlcDtfgV0FhPQWfrSG0DOKklESEk1 MHIGPc4x5N4kMptxhsK7SxKTF0rMaW18LOrz63ihbUvNUo51v3T88kUUjF+IP3t+rrRi66lSk x01KRrr3n60vTz7dG5EuM6CVT9S3t25oJ3vGd4wv+GS3bUQv3ucq3ZflV80zY8veM0sVfdfaR Ma74hc8pDJfx60yZW53rhC2bYsXyh7/pJDjkosxRmJhlrMRcWJAAtICzsYAwAA X-Env-Sender: ketuzsezr@gmail.com X-Msg-Ref: server-9.tower-31.messagelabs.com!1471276141!8226613!1 X-Originating-IP: [209.85.214.68] X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50 X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22528 invoked from network); 15 Aug 2016 15:49:02 -0000 Received: from mail-it0-f68.google.com (HELO mail-it0-f68.google.com) (209.85.214.68) by server-9.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 15 Aug 2016 15:49:02 -0000 Received: by mail-it0-f68.google.com with SMTP id d65so3606366ith.0 for ; Mon, 15 Aug 2016 08:49:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0zFXGNLDrLyqVmDysT5ejrAiuTkP1f0mAwIohn73vdU=; b=Gbz2nOOJFkOnTsYEVQFFGf1iW/KMfN8HpSetnOAE0UhkXfAzTAjw3uPWBe69efv29c DcOK0tvVtUpAzRcRPlVW1SaOKE817q4KaAzJJXCT2xwoTKm9Da4jVaMNajqk6YJihhtY fjLRHz3oCTnAX3DNw99f3PPilpv4gWPwT6NuK1rDs5S7G4gtdu3TebtJMDEU3b5CKj2T 1i6EVgp90xnP2P+2gUAp+mtOj8+Fak53P6+BkWUpQrSeC1tlmrtm4A814UEMHHClOHRV kjqBF2q9TbTbybp6FhVF9gDjk6cL6IMd/zr7NjO/YK/85VQpGaukme6HD91jsEr3Cf3I r2hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=0zFXGNLDrLyqVmDysT5ejrAiuTkP1f0mAwIohn73vdU=; b=OjONf/boJWZIDViTpLYsX5CtaQIbEXwIPrE3Iu+AGALSgL5ZK34kDZ5CHOer8DNRaB MIolSawpFiGvSAYg8hEzy6BVOBfK4nx0TJSdsmYZbL9TZH3JDBUU3l4WpZMsTi09xXou Cy1vVLK8kHZSGCRjmqhfkgQyXTRwleErr1RiymaXXse1rZHRtnu4TyNd4odf/ypHrch3 I6hu1CDILv+43IufKwp407PfHgoHUAXwOaUunFJ4ivlxCSTlCrKcpUeGkWyiaDWt1424 PP/fzx1/rxp213uf7FCpK5dhtgxSXH7fD5/ybZop+6ND/pXDDwOuePojscPyhUrof+Nb twcw== X-Gm-Message-State: AEkoouvubTxVr+DBGTLFQx4OqxGTFfCX1IN0dZPcu2El8hx5iOP/VXJDxPRx9YYk2HQvQw== X-Received: by 10.36.238.138 with SMTP id b132mr15666820iti.37.1471276141190; Mon, 15 Aug 2016 08:49:01 -0700 (PDT) Received: from localhost.localdomain ([148.87.66.58]) by smtp.gmail.com with ESMTPSA id i198sm577115itf.3.2016.08.15.08.49.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Aug 2016 08:49:00 -0700 (PDT) Date: Mon, 15 Aug 2016 11:49:00 -0400 From: Konrad Rzeszutek Wilk To: Julien Grall Message-ID: <20160815154900.GA5296@localhost.localdomain> References: <1471216074-3007-1-git-send-email-konrad.wilk@oracle.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) Cc: xen-devel@lists.xenproject.org, ross.lagerwall@citrix.com, sstabellini@kernel.org Subject: Re: [Xen-devel] [PATCH v1] Livepatch ARM 64 implementation X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Aug 15, 2016 at 04:52:58PM +0200, Julien Grall wrote: > > > On 15/08/2016 01:07, Konrad Rzeszutek Wilk wrote: > > Hey! > > Hi Konrad, > > > This is the first (non RFC) posting of the enablement of Livepatch under ARM64. > > > > The patches are based on: [PATCH v3] Livepatch fixes and features for v4.8. > > (https://lists.xen.org/archives/html/xen-devel/2016-08/msg01825.html) > > > > And the git tree is: > > git://xenbits.xen.org/people/konradwilk/xen.git livepatch.v4.8.v3 > > > > I've only tested this under Foundation Platform with only one CPU working > > (the other CPUs wouldn't boot up for some reason) and without a proper working > > disk image (can't recall why, but it did have an initramfs) - I ended > > up building the hypervisor with the livepatch built in and loading it during > > dom0 execution (via timers), see > > (http://xenbits.xen.org/gitweb/?p=people/konradwilk/xen.git;a=commit;h=39517b2b807025d0d63d4f042ada5eb3de32ff45) > > [That patch is not part of this patchset of course] > > I am able to use both SMP and the rootfs on the foundation model. What is > hte command line you are using? How about the device tree? ~/ARM/Foundation_Platformpkg/models/Linux64_GCC-4.7/Foundation_Platform --image ~/ARM/boot-wrapper-aarch64.git/xen-system.axf And the boot-wrapper-aarch64.git does: aarch64 git log --oneline | head -1 b564cbf Fix build when USE_INITRD not set aarch64 make xen-system.axf aarch64-linux-gnu-gcc -DCNTFRQ=0x01800000 -DUART_BASE=0x1c090000 -DLED=0x0008 -DSYSREGS_BASE=0x1c010000 -DGIC_DIST_BASE=0x2c001000 -DGIC_CPU_BASE=0x2c002000 -c -o boot.xen.o boot.S -DXEN aarch64-linux-gnu-gcc -DPHYS_OFFSET=0x80000000 -DMBOX_OFFSET=0xfff8 -DBOOT=boot.xen.o -DXEN_OFFSET=0xA00000 -DKERNEL_OFFSET=0x80000 -DFDT_OFFSET=0x08000000 -DFS_OFFSET=0x10000000 -DXEN=Xen -DKERNEL=Image -DFILESYSTEM=filesystem.cpio.gz -E -P -C -o model.xen.lds model.lds.S And it looks I tried at some point to play with the LEDs (not very well) > Cheers, > > -- > Julien Grall diff --git a/Makefile b/Makefile index 241091f..dd50f09 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ SYSREGS_BASE := 0x1c010000 GIC_DIST_BASE := 0x2c001000 GIC_CPU_BASE := 0x2c002000 CNTFRQ := 0x01800000 # 24Mhz - +LED := 0x0008 #INITRD_FLAGS := -DUSE_INITRD CPPFLAGS += $(INITRD_FLAGS) @@ -78,13 +78,13 @@ $(XIMAGE): boot.xen.o model.xen.lds fdt.dtb $(XEN) $(KERNEL) $(FILESYSTEM) $(LD) -o $@ --script=model.xen.lds boot.o: $(BOOTLOADER) Makefile - $(CC) $(CPPFLAGS) -DCNTFRQ=$(CNTFRQ) -DUART_BASE=$(UART_BASE) -DSYSREGS_BASE=$(SYSREGS_BASE) -DGIC_DIST_BASE=$(GIC_DIST_BASE) -DGIC_CPU_BASE=$(GIC_CPU_BASE) -c -o $@ $(BOOTLOADER) + $(CC) $(CPPFLAGS) -DCNTFRQ=$(CNTFRQ) -DUART_BASE=$(UART_BASE) -DLED=$(LED) -DSYSREGS_BASE=$(SYSREGS_BASE) -DGIC_DIST_BASE=$(GIC_DIST_BASE) -DGIC_CPU_BASE=$(GIC_CPU_BASE) -c -o $@ $(BOOTLOADER) model.lds: $(LD_SCRIPT) Makefile $(CC) $(CPPFLAGS) -DPHYS_OFFSET=$(PHYS_OFFSET) -DMBOX_OFFSET=$(MBOX_OFFSET) -DBOOT=boot.o -DKERNEL_OFFSET=$(KERNEL_OFFSET) -DFDT_OFFSET=$(FDT_OFFSET) -DFS_OFFSET=$(FS_OFFSET) -DKERNEL=$(KERNEL) -DFILESYSTEM=$(FILESYSTEM) -E -P -C -o $@ $< boot.xen.o: $(BOOTLOADER) Makefile - $(CC) $(CPPFLAGS) -DCNTFRQ=$(CNTFRQ) -DUART_BASE=$(UART_BASE) -DSYSREGS_BASE=$(SYSREGS_BASE) -DGIC_DIST_BASE=$(GIC_DIST_BASE) -DGIC_CPU_BASE=$(GIC_CPU_BASE) -c -o $@ $(BOOTLOADER) -DXEN + $(CC) $(CPPFLAGS) -DCNTFRQ=$(CNTFRQ) -DUART_BASE=$(UART_BASE) -DLED=$(LED) -DSYSREGS_BASE=$(SYSREGS_BASE) -DGIC_DIST_BASE=$(GIC_DIST_BASE) -DGIC_CPU_BASE=$(GIC_CPU_BASE) -c -o $@ $(BOOTLOADER) -DXEN model.xen.lds: $(LD_SCRIPT) Makefile $(CC) $(CPPFLAGS) -DPHYS_OFFSET=$(PHYS_OFFSET) -DMBOX_OFFSET=$(MBOX_OFFSET) -DBOOT=boot.xen.o -DXEN_OFFSET=$(XEN_OFFSET) -DKERNEL_OFFSET=$(KERNEL_OFFSET) -DFDT_OFFSET=$(FDT_OFFSET) -DFS_OFFSET=$(FS_OFFSET) -DXEN=$(XEN) -DKERNEL=$(KERNEL) -DFILESYSTEM=$(FILESYSTEM) -E -P -C -o $@ $< diff --git a/boot.S b/boot.S index 3e2cecd..60b642c 100644 --- a/boot.S +++ b/boot.S @@ -107,6 +107,13 @@ start_ns: str wzr, [x4, #0xa0] // V2M_SYS_CFGDATA str w5, [x4, #0xa4] // V2M_SYS_CFGCTRL + ldr x4, =LED + mov w5, #0xFF + str w5, [x4] + + mov x4, #0x00A4 + mov w5, #0xC0800000 + str w5, [x4] /* * Primary CPU */ Anyhow the more important is the DTS: total 248784 drwxrwxr-x. 3 konrad konrad 4096 Aug 15 11:46 . drwxrwxr-x. 11 konrad konrad 4096 Aug 15 11:40 .. -rw-rw-r--. 1 konrad konrad 90957497 Apr 15 15:50 64 -rw-rw-r--. 1 konrad konrad 90571528 Apr 15 15:49 a -rw-rw-r--. 1 konrad konrad 2388 Apr 15 22:54 boot.S -rw-rw-r--. 1 konrad konrad 1544 Aug 15 11:46 boot.xen.o lrwxrwxrwx. 1 konrad konrad 41 Apr 15 14:17 fdt.dtb -> ../arm-dts/fast_models/rtsm_ve-aemv8a.dtb drwxrwxr-x. 8 konrad konrad 4096 Apr 15 14:17 .git -rw-rw-r--. 1 konrad konrad 44 Apr 15 14:17 .gitignore lrwxrwxrwx. 1 konrad konrad 10 Apr 15 14:24 Image -> ../vmlinuz -rw-rw-r--. 1 konrad konrad 1508 Apr 15 14:17 LICENSE.txt -rw-rw-r--. 1 konrad konrad 3701 Apr 15 22:53 Makefile -rw-rw-r--. 1 konrad konrad 935 Apr 15 14:17 model.lds.S -rw-rw-r--. 1 konrad konrad 2457 Aug 15 11:46 model.xen.lds -rw-rw-r--. 1 konrad konrad 667 Apr 15 14:17 README lrwxrwxrwx. 1 konrad konrad 41 Apr 15 15:26 rtsm_ve-aemv8a.dts -> ../arm-dts/fast_models/rtsm_ve-aemv8a.dts -rw-rw-r--. 1 konrad konrad 6007 Apr 15 15:28 rtsm_ve-motherboard.dtsi lrwxrwxrwx. 1 konrad konrad 14 Apr 22 15:19 Xen -> ../xen/xen/xen -rwxrwxr-x. 1 konrad konrad 853552 Apr 15 15:40 xen64 -rwxrwxr-x. 1 konrad konrad 853552 Apr 15 23:12 Xen.ok lrwxrwxrwx. 1 konrad konrad 24 Apr 15 21:55 Xen.old -> /home/konrad/xen/xen/xen -rwxrwxr-x. 1 konrad konrad 6761469 Aug 15 11:46 xen-system.axf -rw-rw-r--. 1 konrad konrad 64854103 Apr 15 15:46 z aarch64 git log --oneline | head -1 cbfbe3d versatile_express: Update to 3.19 state With this change: diff --git a/fast_models/rtsm_ve-aemv8a.dts b/fast_models/rtsm_ve-aemv8a.dts index 50b544d..6c6240c 100644 --- a/fast_models/rtsm_ve-aemv8a.dts +++ b/fast_models/rtsm_ve-aemv8a.dts @@ -18,7 +18,17 @@ #address-cells = <2>; #size-cells = <2>; - chosen { }; + chosen { + #address-cells = <1>; + #size-cells = <1>; + + xen,xen-bootargs = "dtuart=serial0 loglvl=all guesd_loglvl=all dom0_mem=512M,max:512"; + module@1 { + compatible = "xen,linux-zimage", "xen,multiboot-module"; + reg = <0x80080000 0x800000>; + bootargs = ""; + }; + }; aliases { serial0 = &v2m_serial0;