All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Wiklander <jens.wiklander@linaro.org>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Devicetree List <devicetree@vger.kernel.org>,
	Trilok Soni <tsoni@codeaurora.org>,
	arve@android.com, Andrew Walbran <qwandor@google.com>,
	David Hartley <dhh@qti.qualcomm.com>,
	Achin Gupta <Achin.Gupta@arm.com>,
	Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>,
	Marc Bonnici <marc.bonnici@arm.com>
Subject: Re: [PATCH v4 7/7] firmware: arm_ffa: Add support for MEM_* interfaces
Date: Thu, 18 Mar 2021 15:02:35 +0100	[thread overview]
Message-ID: <CAHUa44FKwpwu5W57KL7HLWo6+9mo2xk68kU+q72jk7xL5424vQ@mail.gmail.com> (raw)
In-Reply-To: <20210212154614.38604-8-sudeep.holla@arm.com>

On Fri, Feb 12, 2021 at 4:46 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> Most of the MEM_* APIs share the same parameters, so they can be
> generalised. Currently only MEM_SHARE is implemented and the user space
> interface for that is not added yet.
>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  drivers/firmware/arm_ffa/driver.c | 184 ++++++++++++++++++++++++++++++
>  include/linux/arm_ffa.h           | 150 ++++++++++++++++++++++++
>  2 files changed, 334 insertions(+)
>
[snip]
> diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
> index f0c68f3f1c6a..9d7a5a3eac75 100644
> --- a/include/linux/arm_ffa.h
> +++ b/include/linux/arm_ffa.h
[snip]
> +struct ffa_mem_region {
> +       /* The ID of the VM/owner which originally sent the memory region */
> +       u16 sender_id;
> +#define FFA_MEM_NORMAL         BIT(5)
> +#define FFA_MEM_DEVICE         BIT(4)
> +
> +#define FFA_MEM_WRITE_BACK     (3 << 2)
> +#define FFA_MEM_NON_CACHEABLE  (1 << 2)
> +
> +#define FFA_DEV_nGnRnE         (0 << 2)
> +#define FFA_DEV_nGnRE          (1 << 2)
> +#define FFA_DEV_nGRE           (2 << 2)
> +#define FFA_DEV_GRE            (3 << 2)
> +
> +#define FFA_MEM_NON_SHAREABLE  (0)
> +#define FFA_MEM_OUTER_SHAREABLE        (2)
> +#define FFA_MEM_INNER_SHAREABLE        (3)
> +       u8 attributes;
> +       u8 reserved_0;
> +/*
> + * Clear memory region contents after unmapping it from the sender and
> + * before mapping it for any receiver.
> + */
> +#define FFA_MEM_CLEAR                  BIT(0)
> +/*
> + * Whether the hypervisor may time slice the memory sharing or retrieval
> + * operation.
> + */
> +#define FFA_TIME_SLICE_ENABLE          BIT(1)
> +
> +/*
> + * Whether the hypervisor should clear the memory region before the receiver
> + * relinquishes it or is aborted.
> + */
> +#define FFA_MEM_CLEAR_BEFORE_RELINQUISH        BIT(0)

I believe this should be clear before retrieval.

Thanks,
Jens

WARNING: multiple messages have this Message-ID (diff)
From: Jens Wiklander <jens.wiklander@linaro.org>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>,
	 Devicetree List <devicetree@vger.kernel.org>,
	Trilok Soni <tsoni@codeaurora.org>,
	arve@android.com,  Andrew Walbran <qwandor@google.com>,
	David Hartley <dhh@qti.qualcomm.com>,
	 Achin Gupta <Achin.Gupta@arm.com>,
	Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>,
	 Marc Bonnici <marc.bonnici@arm.com>
Subject: Re: [PATCH v4 7/7] firmware: arm_ffa: Add support for MEM_* interfaces
Date: Thu, 18 Mar 2021 15:02:35 +0100	[thread overview]
Message-ID: <CAHUa44FKwpwu5W57KL7HLWo6+9mo2xk68kU+q72jk7xL5424vQ@mail.gmail.com> (raw)
In-Reply-To: <20210212154614.38604-8-sudeep.holla@arm.com>

On Fri, Feb 12, 2021 at 4:46 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> Most of the MEM_* APIs share the same parameters, so they can be
> generalised. Currently only MEM_SHARE is implemented and the user space
> interface for that is not added yet.
>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  drivers/firmware/arm_ffa/driver.c | 184 ++++++++++++++++++++++++++++++
>  include/linux/arm_ffa.h           | 150 ++++++++++++++++++++++++
>  2 files changed, 334 insertions(+)
>
[snip]
> diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
> index f0c68f3f1c6a..9d7a5a3eac75 100644
> --- a/include/linux/arm_ffa.h
> +++ b/include/linux/arm_ffa.h
[snip]
> +struct ffa_mem_region {
> +       /* The ID of the VM/owner which originally sent the memory region */
> +       u16 sender_id;
> +#define FFA_MEM_NORMAL         BIT(5)
> +#define FFA_MEM_DEVICE         BIT(4)
> +
> +#define FFA_MEM_WRITE_BACK     (3 << 2)
> +#define FFA_MEM_NON_CACHEABLE  (1 << 2)
> +
> +#define FFA_DEV_nGnRnE         (0 << 2)
> +#define FFA_DEV_nGnRE          (1 << 2)
> +#define FFA_DEV_nGRE           (2 << 2)
> +#define FFA_DEV_GRE            (3 << 2)
> +
> +#define FFA_MEM_NON_SHAREABLE  (0)
> +#define FFA_MEM_OUTER_SHAREABLE        (2)
> +#define FFA_MEM_INNER_SHAREABLE        (3)
> +       u8 attributes;
> +       u8 reserved_0;
> +/*
> + * Clear memory region contents after unmapping it from the sender and
> + * before mapping it for any receiver.
> + */
> +#define FFA_MEM_CLEAR                  BIT(0)
> +/*
> + * Whether the hypervisor may time slice the memory sharing or retrieval
> + * operation.
> + */
> +#define FFA_TIME_SLICE_ENABLE          BIT(1)
> +
> +/*
> + * Whether the hypervisor should clear the memory region before the receiver
> + * relinquishes it or is aborted.
> + */
> +#define FFA_MEM_CLEAR_BEFORE_RELINQUISH        BIT(0)

I believe this should be clear before retrieval.

Thanks,
Jens

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-03-18 14:03 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 15:46 [PATCH v4 0/7] firmware: Add initial support for Arm FF-A Sudeep Holla
2021-02-12 15:46 ` Sudeep Holla
2021-02-12 15:46 ` [PATCH v4 1/7] dt-bindings: Arm: Add Firmware Framework for Armv8-A (FF-A) binding Sudeep Holla
2021-02-12 15:46   ` Sudeep Holla
2021-03-05 20:38   ` Rob Herring
2021-03-05 20:38     ` Rob Herring
2021-02-12 15:46 ` [PATCH v4 2/7] arm64: smccc: Add support for SMCCCv1.2 input/output registers Sudeep Holla
2021-02-12 15:46   ` Sudeep Holla
2021-03-17  7:17   ` Jens Wiklander
2021-03-17  7:17     ` Jens Wiklander
2021-03-23  9:56     ` Sudeep Holla
2021-03-23  9:56       ` Sudeep Holla
2021-02-12 15:46 ` [PATCH v4 3/7] firmware: arm_ffa: Add initial FFA bus support for device enumeration Sudeep Holla
2021-02-12 15:46   ` Sudeep Holla
2021-02-12 15:46 ` [PATCH v4 4/7] firmware: arm_ffa: Add initial Arm FFA driver support Sudeep Holla
2021-02-12 15:46   ` Sudeep Holla
2021-03-19  7:25   ` Jens Wiklander
2021-03-19  7:25     ` Jens Wiklander
2021-03-23  9:53     ` Sudeep Holla
2021-03-23  9:53       ` Sudeep Holla
2021-02-12 15:46 ` [PATCH v4 5/7] firmware: arm_ffa: Add support for SMCCC as transport to FFA driver Sudeep Holla
2021-02-12 15:46   ` Sudeep Holla
2021-03-19  7:02   ` Jens Wiklander
2021-03-19  7:02     ` Jens Wiklander
2021-02-12 15:46 ` [PATCH v4 6/7] firmware: arm_ffa: Setup in-kernel users of FFA partitions Sudeep Holla
2021-02-12 15:46   ` Sudeep Holla
2021-03-18 13:08   ` Jens Wiklander
2021-03-18 13:08     ` Jens Wiklander
2021-02-12 15:46 ` [PATCH v4 7/7] firmware: arm_ffa: Add support for MEM_* interfaces Sudeep Holla
2021-02-12 15:46   ` Sudeep Holla
2021-03-18 14:02   ` Jens Wiklander [this message]
2021-03-18 14:02     ` Jens Wiklander
2021-03-16 14:34 ` [PATCH v4 0/7] firmware: Add initial support for Arm FF-A Sudeep Holla
2021-03-16 14:34   ` Sudeep Holla
2021-03-18 14:09   ` Jens Wiklander
2021-03-18 14:09     ` Jens Wiklander
2021-03-19  7:56     ` Jens Wiklander
2021-03-19  7:56       ` Jens Wiklander
2021-03-23  9:50       ` Sudeep Holla
2021-03-23  9:50         ` Sudeep Holla
2021-03-23  9:49     ` Sudeep Holla
2021-03-23  9:49       ` Sudeep Holla

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=CAHUa44FKwpwu5W57KL7HLWo6+9mo2xk68kU+q72jk7xL5424vQ@mail.gmail.com \
    --to=jens.wiklander@linaro.org \
    --cc=Achin.Gupta@arm.com \
    --cc=arunachalam.ganapathy@arm.com \
    --cc=arve@android.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dhh@qti.qualcomm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marc.bonnici@arm.com \
    --cc=qwandor@google.com \
    --cc=sudeep.holla@arm.com \
    --cc=tsoni@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.