linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <andersson@kernel.org>
To: Elliot Berman <quic_eberman@quicinc.com>
Cc: Alex Elder <elder@linaro.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Prakruthi Deepak Heragu <quic_pheragu@quicinc.com>,
	Murali Nalajala <quic_mnalajal@quicinc.com>,
	Trilok Soni <quic_tsoni@quicinc.com>,
	Srivatsa Vaddagiri <quic_svaddagi@quicinc.com>,
	Carl van Schaik <quic_cvanscha@quicinc.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Bagas Sanjaya <bagasdotme@gmail.com>,
	Will Deacon <will@kernel.org>, Andy Gross <agross@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	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
Date: Sat, 5 Aug 2023 11:03:33 -0700	[thread overview]
Message-ID: <3krirzh2fojye44a7trzit54opfssnzzsujbo4kzv2mqzhpsmo@qrm53c5naaqw> (raw)
In-Reply-To: <20230613172054.3959700-14-quic_eberman@quicinc.com>

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 <stdlib.h>
> +#include <stdio.h>
> +#include <unistd.h>
> +#include <sys/types.h>
> +#include <sys/stat.h>
> +#include <fcntl.h>
> +#include <sys/ioctl.h>
> +#include <getopt.h>
> +#include <limits.h>
> +#include <stdint.h>
> +#include <fcntl.h>
> +#include <string.h>
> +#include <sys/sysmacros.h>
> +#define __USE_GNU
> +#include <sys/mman.h>
> +
> +#include <linux/gunyah.h>
> +
> +#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
> 

  reply	other threads:[~2023-08-05 18:00 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13 17:20 [PATCH v14 00/25] Drivers for Gunyah hypervisor Elliot Berman
2023-06-13 17:20 ` [PATCH v14 01/25] docs: gunyah: Introduce Gunyah Hypervisor Elliot Berman
2023-06-16 16:32   ` Alex Elder
2023-07-03 22:41     ` Elliot Berman
2023-07-14 13:35       ` Alex Elder
2023-08-05 17:07   ` Bjorn Andersson
2023-06-13 17:20 ` [PATCH v14 02/25] dt-bindings: Add binding for gunyah hypervisor Elliot Berman
2023-06-16 16:32   ` Alex Elder
2023-08-05  3:34   ` Bjorn Andersson
2023-06-13 17:20 ` [PATCH v14 03/25] gunyah: Common types and error codes for Gunyah hypercalls Elliot Berman
2023-08-05  3:39   ` Bjorn Andersson
2023-06-13 17:20 ` [PATCH v14 04/25] virt: gunyah: Add hypercalls to identify Gunyah Elliot Berman
2023-06-13 17:20 ` [PATCH v14 05/25] virt: gunyah: msgq: Add hypercalls to send and receive messages Elliot Berman
2023-08-05  3:51   ` Bjorn Andersson
2023-06-13 17:20 ` [PATCH v14 06/25] mailbox: Add Gunyah message queue mailbox Elliot Berman
2023-06-16 16:33   ` Alex Elder
2023-08-03  0:33   ` Jassi Brar
2023-08-05  4:16   ` Bjorn Andersson
2023-06-13 17:20 ` [PATCH v14 07/25] gunyah: rsc_mgr: Add resource manager RPC core Elliot Berman
2023-08-05  5:02   ` Bjorn Andersson
2023-06-13 17:20 ` [PATCH v14 08/25] gunyah: rsc_mgr: Add VM lifecycle RPC Elliot Berman
2023-08-05 17:18   ` Bjorn Andersson
2023-06-13 17:20 ` [PATCH v14 09/25] gunyah: vm_mgr: Introduce basic VM Manager Elliot Berman
2023-08-05 17:26   ` Bjorn Andersson
2023-06-13 17:20 ` [PATCH v14 10/25] gunyah: rsc_mgr: Add RPC for sharing memory Elliot Berman
2023-08-05 17:55   ` Bjorn Andersson
2023-06-13 17:20 ` [PATCH v14 11/25] gunyah: vm_mgr: Add/remove user memory regions Elliot Berman
2023-06-16 16:33   ` Alex Elder
2023-06-13 17:20 ` [PATCH v14 12/25] gunyah: vm_mgr: Add ioctls to support basic non-proxy VM boot Elliot Berman
2023-06-13 17:20 ` [PATCH v14 13/25] samples: Add sample userspace Gunyah VM Manager Elliot Berman
2023-08-05 18:03   ` Bjorn Andersson [this message]
2023-06-13 17:20 ` [PATCH v14 14/25] gunyah: rsc_mgr: Add platform ops on mem_lend/mem_reclaim Elliot Berman
2023-08-05 18:07   ` Bjorn Andersson
2023-06-13 17:20 ` [PATCH v14 15/25] virt: gunyah: Add Qualcomm Gunyah platform ops Elliot Berman
2023-08-05 18:11   ` Bjorn Andersson
2023-06-13 17:20 ` [PATCH v14 16/25] docs: gunyah: Document Gunyah VM Manager Elliot Berman
2023-06-16 16:34   ` Alex Elder
2023-06-13 17:20 ` [PATCH v14 17/25] virt: gunyah: Translate gh_rm_hyp_resource into gunyah_resource Elliot Berman
2023-08-05 18:15   ` Bjorn Andersson
2023-06-13 17:20 ` [PATCH v14 18/25] gunyah: vm_mgr: Add framework for VM Functions Elliot Berman
2023-06-16 16:34   ` Alex Elder
2023-06-13 17:20 ` [PATCH v14 19/25] virt: gunyah: Add resource tickets Elliot Berman
2023-06-13 17:20 ` [PATCH v14 20/25] virt: gunyah: Add IO handlers Elliot Berman
2023-06-13 17:20 ` [PATCH v14 21/25] virt: gunyah: Add proxy-scheduled vCPUs Elliot Berman
2023-06-13 17:20 ` [PATCH v14 22/25] virt: gunyah: Add hypercalls for sending doorbell Elliot Berman
2023-06-13 17:20 ` [PATCH v14 23/25] virt: gunyah: Add irqfd interface Elliot Berman
2023-06-16 16:34   ` Alex Elder
2023-06-13 17:20 ` [PATCH v14 24/25] virt: gunyah: Add ioeventfd Elliot Berman
2023-06-13 17:20 ` [PATCH v14 25/25] MAINTAINERS: Add Gunyah hypervisor drivers section Elliot Berman
2023-08-05 18:19   ` Bjorn Andersson
2023-06-16 16:35 ` [PATCH v14 00/25] Drivers for Gunyah hypervisor Alex Elder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3krirzh2fojye44a7trzit54opfssnzzsujbo4kzv2mqzhpsmo@qrm53c5naaqw \
    --to=andersson@kernel.org \
    --cc=agross@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bagasdotme@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=elder@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_cvanscha@quicinc.com \
    --cc=quic_eberman@quicinc.com \
    --cc=quic_mnalajal@quicinc.com \
    --cc=quic_pheragu@quicinc.com \
    --cc=quic_svaddagi@quicinc.com \
    --cc=quic_tsoni@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).