Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp1303408rwb; Sat, 5 Aug 2023 11:33:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYSYO8V1wDu1RhrqvAqa2HR+dGFQ6sjMYtqi5fvEb2xkyqzv3oJdOXooMu/mFY9xmsm7B6 X-Received: by 2002:a05:6512:3b9d:b0:4f8:4512:c844 with SMTP id g29-20020a0565123b9d00b004f84512c844mr4267163lfv.48.1691260403003; Sat, 05 Aug 2023 11:33:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691260402; cv=none; d=google.com; s=arc-20160816; b=KMCCEjA+RtssAlRGFO7J60p8y8Y6Om4T6Ome6+E8xoaGw4PpJTrsIFJiw+v6cvm0zU wTlvorhdlUwfmCFRIM70wpt6yy698Gq30PudIl135eLIdIdbLFMUFVKESvrV1I9MpTnQ nmDeHAajWVbJNRorcWULzM4RGFdLKAk6Wdotdu2uChbe8Jxgg+2NhRg5j0KTrkYYSFby q79bcYcw2m7QQPGkWOsiYna2l4CAROxsils8LsD0bJwGbpQueqKTvMKZW91s1eF6WmmQ jok7m86+XP4eBFe8HrQqOtDXe+B2slmAQLki9+/Bvw1x/AXaqXGVvHAr2kbAhrcP4Gsn yJiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wsOSWQw9CjdOxk5fmM3FgjwuMiNL2qnfZn3RD/T5hcM=; fh=iMjFSzO3l9gXADssU1Q67/ONc9ruJ8Gn5fwooRpFPoU=; b=p0CK7q8zcr95c9sv1oPNWVfal49wqaT1eH3qyMIS64b+yqFH6wmXT/BEBxJbYPp3J0 PVr+Q1426RclfXFCSugzJ9JnrvFKIDlZnKjj92N9zit7f1SWkCbXxNsAiXNOAAzxt6Q8 ldfDd3BzVnUcjWCMa1R9v+2F0WKoKRzKN/lwXthv73Hcq8QileKVywTEE7f5HN5pqq0Z hTzv2YKr7RuADIokHn8Yc4QpUk3pGHhbghMsuvfi0giMQA2jZKEI5S+f6edrvd6lfwdL u9kPnNIJaPmjWRvhCjrtgZeDG12YoYcsTNMxRoJIWns0GOyNcggJm/cKj+WnMI8P9a61 MRIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZxNoetsh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v4-20020aa7d644000000b0052224390345si3381257edr.61.2023.08.05.11.32.58; Sat, 05 Aug 2023 11:33:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZxNoetsh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230042AbjHESAk (ORCPT + 99 others); Sat, 5 Aug 2023 14:00:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbjHESAi (ORCPT ); Sat, 5 Aug 2023 14:00:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E439183; Sat, 5 Aug 2023 11:00:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1B9EF60B99; Sat, 5 Aug 2023 18:00:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C80C0C433C8; Sat, 5 Aug 2023 18:00:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691258436; bh=4OB0LIsIuMwZCxSV0QuHTkdvl8z1YvtMFoPcoJgVuiE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZxNoetshNaW9M7ViwOc/cCpVU9y5ak8RsVNGta57besr7s4NoxxH/dndsemD5RjLe o/k0TYBfQ6fnyzMM5RDhVIv7MV98iPK+MdcfHYjh/OdBi1cEi5oCDG/fA1vOh4t6Cd n0Y6Fz6cF3apXUP9pcTeLc78XlWP1cO9kkH+pJo62dX1PDvzlngzJ2OPaN5840g2f4 V4gSJY0qz4oo+/eMKmrm0e79OAj5W4MR/YHRinV/8a3OOCBQqOz4mfjKGn+xQ0Zzm2 ItJQnGtDCkCK3EoMD/CfB8y8iAibHjZ1jsNhxxVVLYZNZq7kcTKQaQHGHYlkC6SeXM S+4WvKmyvN3yA== Date: Sat, 5 Aug 2023 11:03:33 -0700 From: Bjorn Andersson To: Elliot Berman Cc: Alex Elder , Srinivas Kandagatla , Prakruthi Deepak Heragu , Murali Nalajala , Trilok Soni , Srivatsa Vaddagiri , Carl van Schaik , Dmitry Baryshkov , Konrad Dybcio , Arnd Bergmann , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , Bagas Sanjaya , Will Deacon , Andy Gross , Catalin Marinas , Jassi Brar , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v14 13/25] samples: Add sample userspace Gunyah VM Manager Message-ID: <3krirzh2fojye44a7trzit54opfssnzzsujbo4kzv2mqzhpsmo@qrm53c5naaqw> References: <20230613172054.3959700-1-quic_eberman@quicinc.com> <20230613172054.3959700-14-quic_eberman@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230613172054.3959700-14-quic_eberman@quicinc.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 13, 2023 at 10:20:41AM -0700, Elliot Berman wrote: > diff --git a/samples/gunyah/gunyah_vmm.c b/samples/gunyah/gunyah_vmm.c > new file mode 100644 > index 0000000000000..6f636ac227c69 > --- /dev/null > +++ b/samples/gunyah/gunyah_vmm.c > @@ -0,0 +1,266 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#define __USE_GNU > +#include > + > +#include > + > +#define DEFAULT_GUEST_BASE 0x80000000 > +#define DEFAULT_GUEST_SIZE 0x6400000 /* 100 MiB */ > +#define DEFAULT_DTB_OFFSET 0x45f0000 /* 70MiB - 64 KiB */ > +#define DEFAULT_RAMDISK_OFFSET 0x4600000 /* 70MiB */ Would be nice if the default ramdisk offset was close to accounting for the kernel modules produced in an upstream defconfig build... Perhaps just bumping the default guest size to facilitate this? [..] > diff --git a/samples/gunyah/sample_vm.dts b/samples/gunyah/sample_vm.dts > new file mode 100644 > index 0000000000000..293bbc0469c8f > --- /dev/null > +++ b/samples/gunyah/sample_vm.dts > @@ -0,0 +1,68 @@ > +// SPDX-License-Identifier: BSD-3-Clause > +/* > + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. > + */ > + > +/dts-v1/; > + > +/ { > + #address-cells = <2>; > + #size-cells = <2>; > + interrupt-parent = <&intc>; > + > + chosen { > + bootargs = "nokaslr"; Is this required? > + }; > + > + cpus { > + #address-cells = <0x2>; > + #size-cells = <0>; > + > + cpu@0 { > + device_type = "cpu"; > + compatible = "arm,armv8"; > + reg = <0 0>; > + }; > + }; > + > + intc: interrupt-controller@3FFF0000 { > + compatible = "arm,gic-v3"; > + #interrupt-cells = <3>; > + #address-cells = <2>; > + #size-cells = <2>; > + interrupt-controller; > + reg = <0 0x3FFF0000 0 0x10000>, > + <0 0x3FFD0000 0 0x20000>; Lowercase hex digits please. > + }; > + > + timer { > + compatible = "arm,armv8-timer"; > + always-on; > + interrupts = <1 13 0x108>, > + <1 14 0x108>, > + <1 11 0x108>, > + <1 10 0x108>; > + clock-frequency = <19200000>; > + }; > + > + gunyah-vm-config { Is this node documented somewhere? Regards, Bjorn > + image-name = "linux_vm_0"; > + > + memory { > + #address-cells = <2>; > + #size-cells = <2>; > + > + base-address = <0 0x80000000>; > + }; > + > + interrupts { > + config = <&intc>; > + }; > + > + vcpus { > + affinity-map = < 0 >; > + sched-priority = < (-1) >; > + sched-timeslice = < 2000 >; > + }; > + }; > +}; > -- > 2.40.0 >