From: Devaraj Rangasamy <Devaraj.Rangasamy@amd.com>
To: Randy Dunlap <rdunlap@infradead.org>,
Jonathan Corbet <corbet@lwn.net>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>,
Jens Wiklander <jens.wiklander@linaro.org>,
Sumit Garg <sumit.garg@linaro.org>,
"Paul E . McKenney" <paulmck@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
Daniel Sneddon <daniel.sneddon@linux.intel.com>,
Rijo Thomas <Rijo-john.Thomas@amd.com>,
SivaSangeetha SK <SivaSangeetha.SK@amd.com>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Juergen Gross <jgross@suse.com>, Ard Biesheuvel <ardb@kernel.org>,
Ross Lagerwall <ross.lagerwall@citrix.com>,
Yuntao Wang <ytcoode@gmail.com>,
Sean Christopherson <seanjc@google.com>,
Jarkko Nikula <jarkko.nikula@linux.intel.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
Tom Lendacky <thomas.lendacky@amd.com>,
Mario Limonciello <mario.limonciello@amd.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
op-tee@lists.trustedfirmware.org
Cc: Mythri PK <Mythri.Pandeshwarakrishna@amd.com>,
Nimesh Easow <Nimesh.Easow@amd.com>
Subject: Re: [PATCH] tee: amdtee: add support for use of cma region
Date: Tue, 29 Aug 2023 22:17:36 +0530 [thread overview]
Message-ID: <92ed14f5-d999-4d54-915b-0a3449da44f8@amd.com> (raw)
In-Reply-To: <0f16dd5a-bce7-0e36-3827-f713e90fb843@infradead.org>
On 8/19/2023 4:34 AM, Randy Dunlap wrote:
> Hi--
>
> On 8/18/23 07:42, Devaraj Rangasamy wrote:
>> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
>> index 722b6eca2e93..5e38423f3d53 100644
>> --- a/Documentation/admin-guide/kernel-parameters.txt
>> +++ b/Documentation/admin-guide/kernel-parameters.txt
>> @@ -363,6 +363,13 @@
>> selects a performance level in this range and appropriate
>> to the current workload.
>>
>> + amdtee_cma=nn [HW,TEE]
>> + Sets the memory size reserved for contiguous memory
>> + allocations, to be used by amdtee device driver.
>> + Value is in MB and can range from 4 to 128 (MBs)
> 128 (MBs).
Ack.
In updated patch, we dont use new custom kernel command line parameter,
and resorted to generic cma zone.
>
>> + CMA will be active only when CMA is enabled, and amdtee is
> That could use some improvement. How about:
>
> AMD-TEE CMA will be active only when CONFIG_CMA is enabled,
> and amdtee is
Ack, as above.
>
>> + built as inbuilt driver, and not loaded as module.
>> +
>> amijoy.map= [HW,JOY] Amiga joystick support
>> Map of devices attached to JOY0DAT and JOY1DAT
>> Format: <a>,<b>
>> diff --git a/drivers/tee/amdtee/Kconfig b/drivers/tee/amdtee/Kconfig
>> index 191f9715fa9a..5843c739a7b8 100644
>> --- a/drivers/tee/amdtee/Kconfig
>> +++ b/drivers/tee/amdtee/Kconfig
>> @@ -6,3 +6,12 @@ config AMDTEE
>> depends on CRYPTO_DEV_SP_PSP && CRYPTO_DEV_CCP_DD
>> help
>> This implements AMD's Trusted Execution Environment (TEE) driver.
>> +
>> +config AMDTEE_CMA_SIZE
>> + int "Size of Memory in MiB reserved in CMA for AMD-TEE"
>> + default "0"
> Why won't this default value cause an allocation error message?
> Maybe I'm just not following the call paths correctly.
>
> It looks to me like this causes a call to
> cma_declare_contiguous_nid() with @size = 0, and that function says:
>
> if (!size)
> return -EINVAL;
Ack.
It did resulted in error message. We have revoked new exclusive cma zone
now.
>> + depends on CMA && (AMDTEE=y)
>> + help
>> + Specify the default amount of memory in MiB reserved in CMA for AMD-TEE driver
> driver.
Ack.
>> + Any amdtee shm buffer allocation larger than 64k will allocate memory from the CMA
> CMA.
Ack.
>> + The default can be overridden with the kernel commandline parameter "amdtee_cma".
>> \ No newline at end of file
> Please fix that ^^^ warning.
Ack, as above. Thanks for the review.
>
> Thanks.
next prev parent reply other threads:[~2023-08-29 16:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-18 14:42 Devaraj Rangasamy
2023-08-18 15:26 ` Dave Hansen
2023-08-29 16:47 ` Devaraj Rangasamy
2023-08-18 23:04 ` Randy Dunlap
2023-08-29 16:47 ` Devaraj Rangasamy [this message]
2023-08-19 10:33 ` Alexey Kardashevskiy
2023-08-29 16:47 ` Devaraj Rangasamy
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=92ed14f5-d999-4d54-915b-0a3449da44f8@amd.com \
--to=devaraj.rangasamy@amd.com \
--cc=Mythri.Pandeshwarakrishna@amd.com \
--cc=Nimesh.Easow@amd.com \
--cc=Rijo-john.Thomas@amd.com \
--cc=SivaSangeetha.SK@amd.com \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=daniel.sneddon@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=jens.wiklander@linaro.org \
--cc=jgross@suse.com \
--cc=jpoimboe@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mingo@redhat.com \
--cc=op-tee@lists.trustedfirmware.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rdunlap@infradead.org \
--cc=ross.lagerwall@citrix.com \
--cc=rostedt@goodmis.org \
--cc=seanjc@google.com \
--cc=sumit.garg@linaro.org \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=x86@kernel.org \
--cc=ytcoode@gmail.com \
/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
all inboxes | Powered by JetHome®