[edk2-devel] [PATCH V3 0/4] Reserve shared memory for DMA operation

Min Xu posted 4 patches 1 year, 3 months ago
Failed in applying to current master (apply log)
Maintainers.txt                               |   2 +-
OvmfPkg/IoMmuDxe/{AmdSevIoMmu.c => CcIoMmu.c} | 204 ++++----
OvmfPkg/IoMmuDxe/{AmdSevIoMmu.h => CcIoMmu.h} |   0
OvmfPkg/IoMmuDxe/IoMmuBuffer.c                | 495 ++++++++++++++++++
OvmfPkg/IoMmuDxe/IoMmuDxe.c                   |   2 +-
OvmfPkg/IoMmuDxe/IoMmuDxe.inf                 |   6 +-
OvmfPkg/IoMmuDxe/IoMmuInternal.h              | 179 +++++++
7 files changed, 781 insertions(+), 107 deletions(-)
rename OvmfPkg/IoMmuDxe/{AmdSevIoMmu.c => CcIoMmu.c} (85%)
rename OvmfPkg/IoMmuDxe/{AmdSevIoMmu.h => CcIoMmu.h} (100%)
create mode 100644 OvmfPkg/IoMmuDxe/IoMmuBuffer.c
create mode 100644 OvmfPkg/IoMmuDxe/IoMmuInternal.h
[edk2-devel] [PATCH V3 0/4] Reserve shared memory for DMA operation
Posted by Min Xu 1 year, 3 months ago
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4171

This patch-set introduces the feature of reserving shared memory
for DMA operation. Its intention is to reduce the allocation and
conversion of private/shared memory, so that boot performance
can be improved significantly. Detailed information is in Patch#1.

Patch#2 renames AmdSevIoMmu.* to CcIoMmu.* because these 2 files
support both SEV and TDX guest.

Patch#3 is provided by Tom Lendacky which add SEV support for reserved
shared memory.

Patch#4 updates the related section in Maintainers.txt.

Code: https://github.com/mxu9/edk2/tree/IoMmu.v3

v3 changes:
 - Check mReservedSharedMemSupported in IoMmuReleaseReservedSharedMem
   before release the pre-allocated shared memory.
 - Delete a line of comment in Patch#3 which is suggested by Tom Lendacky.

v2 changes:
 - Add Patch#3 which is provided by Tom Lendacky. It adds SEV support for
   reserved shared memory.
 - Add more description for mReservedMemRanges. It describes:
   1) How the pre-allocated memory is managed.
   2) What if the pre-allocated memory is used up.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>

Min M Xu (3):
  OvmfPkg/IoMmuDxe: Reserve shared memory region for DMA operation
  OvmfPkg/IoMmuDxe: Rename AmdSevIoMmu to CcIoMmu
  Maintainers: Update OvmfPkg/IoMmuDxe

Tom Lendacky (1):
  OvmfPkg/IoMmuDxe: Add SEV support for reserved shared memory

 Maintainers.txt                               |   2 +-
 OvmfPkg/IoMmuDxe/{AmdSevIoMmu.c => CcIoMmu.c} | 204 ++++----
 OvmfPkg/IoMmuDxe/{AmdSevIoMmu.h => CcIoMmu.h} |   0
 OvmfPkg/IoMmuDxe/IoMmuBuffer.c                | 495 ++++++++++++++++++
 OvmfPkg/IoMmuDxe/IoMmuDxe.c                   |   2 +-
 OvmfPkg/IoMmuDxe/IoMmuDxe.inf                 |   6 +-
 OvmfPkg/IoMmuDxe/IoMmuInternal.h              | 179 +++++++
 7 files changed, 781 insertions(+), 107 deletions(-)
 rename OvmfPkg/IoMmuDxe/{AmdSevIoMmu.c => CcIoMmu.c} (85%)
 rename OvmfPkg/IoMmuDxe/{AmdSevIoMmu.h => CcIoMmu.h} (100%)
 create mode 100644 OvmfPkg/IoMmuDxe/IoMmuBuffer.c
 create mode 100644 OvmfPkg/IoMmuDxe/IoMmuInternal.h

-- 
2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97418): https://edk2.groups.io/g/devel/message/97418
Mute This Topic: https://groups.io/mt/95683528/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V3 0/4] Reserve shared memory for DMA operation
Posted by Yao, Jiewen 1 year, 3 months ago
Hi Tom
Any further discussion?

I would like to merge if no other feedback.

> -----Original Message-----
> From: Xu, Min M <min.m.xu@intel.com>
> Sent: Thursday, December 15, 2022 1:18 PM
> To: devel@edk2.groups.io
> Cc: Xu, Min M <min.m.xu@intel.com>; Aktas, Erdem
> <erdemaktas@google.com>; James Bottomley <jejb@linux.ibm.com>; Yao,
> Jiewen <jiewen.yao@intel.com>; Gerd Hoffmann <kraxel@redhat.com>;
> Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
> <gaoliming@byosoft.com.cn>; Tom Lendacky <thomas.lendacky@amd.com>
> Subject: [PATCH V3 0/4] Reserve shared memory for DMA operation
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4171
> 
> This patch-set introduces the feature of reserving shared memory
> for DMA operation. Its intention is to reduce the allocation and
> conversion of private/shared memory, so that boot performance
> can be improved significantly. Detailed information is in Patch#1.
> 
> Patch#2 renames AmdSevIoMmu.* to CcIoMmu.* because these 2 files
> support both SEV and TDX guest.
> 
> Patch#3 is provided by Tom Lendacky which add SEV support for reserved
> shared memory.
> 
> Patch#4 updates the related section in Maintainers.txt.
> 
> Code: https://github.com/mxu9/edk2/tree/IoMmu.v3
> 
> v3 changes:
>  - Check mReservedSharedMemSupported in
> IoMmuReleaseReservedSharedMem
>    before release the pre-allocated shared memory.
>  - Delete a line of comment in Patch#3 which is suggested by Tom Lendacky.
> 
> v2 changes:
>  - Add Patch#3 which is provided by Tom Lendacky. It adds SEV support for
>    reserved shared memory.
>  - Add more description for mReservedMemRanges. It describes:
>    1) How the pre-allocated memory is managed.
>    2) What if the pre-allocated memory is used up.
> 
> Cc: Erdem Aktas <erdemaktas@google.com>
> Cc: James Bottomley <jejb@linux.ibm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
> Signed-off-by: Min Xu <min.m.xu@intel.com>
> 
> Min M Xu (3):
>   OvmfPkg/IoMmuDxe: Reserve shared memory region for DMA operation
>   OvmfPkg/IoMmuDxe: Rename AmdSevIoMmu to CcIoMmu
>   Maintainers: Update OvmfPkg/IoMmuDxe
> 
> Tom Lendacky (1):
>   OvmfPkg/IoMmuDxe: Add SEV support for reserved shared memory
> 
>  Maintainers.txt                               |   2 +-
>  OvmfPkg/IoMmuDxe/{AmdSevIoMmu.c => CcIoMmu.c} | 204 ++++----
>  OvmfPkg/IoMmuDxe/{AmdSevIoMmu.h => CcIoMmu.h} |   0
>  OvmfPkg/IoMmuDxe/IoMmuBuffer.c                | 495 ++++++++++++++++++
>  OvmfPkg/IoMmuDxe/IoMmuDxe.c                   |   2 +-
>  OvmfPkg/IoMmuDxe/IoMmuDxe.inf                 |   6 +-
>  OvmfPkg/IoMmuDxe/IoMmuInternal.h              | 179 +++++++
>  7 files changed, 781 insertions(+), 107 deletions(-)
>  rename OvmfPkg/IoMmuDxe/{AmdSevIoMmu.c => CcIoMmu.c} (85%)
>  rename OvmfPkg/IoMmuDxe/{AmdSevIoMmu.h => CcIoMmu.h} (100%)
>  create mode 100644 OvmfPkg/IoMmuDxe/IoMmuBuffer.c
>  create mode 100644 OvmfPkg/IoMmuDxe/IoMmuInternal.h
> 
> --
> 2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97521): https://edk2.groups.io/g/devel/message/97521
Mute This Topic: https://groups.io/mt/95683528/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V3 0/4] Reserve shared memory for DMA operation
Posted by Lendacky, Thomas via groups.io 1 year, 3 months ago
On 12/16/22 21:11, Yao, Jiewen wrote:
> Hi Tom
> Any further discussion?
> 
> I would like to merge if no other feedback.

No other feedback from me. For the series:

Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>

> 
>> -----Original Message-----
>> From: Xu, Min M <min.m.xu@intel.com>
>> Sent: Thursday, December 15, 2022 1:18 PM
>> To: devel@edk2.groups.io
>> Cc: Xu, Min M <min.m.xu@intel.com>; Aktas, Erdem
>> <erdemaktas@google.com>; James Bottomley <jejb@linux.ibm.com>; Yao,
>> Jiewen <jiewen.yao@intel.com>; Gerd Hoffmann <kraxel@redhat.com>;
>> Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
>> <gaoliming@byosoft.com.cn>; Tom Lendacky <thomas.lendacky@amd.com>
>> Subject: [PATCH V3 0/4] Reserve shared memory for DMA operation
>>
>> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4171
>>
>> This patch-set introduces the feature of reserving shared memory
>> for DMA operation. Its intention is to reduce the allocation and
>> conversion of private/shared memory, so that boot performance
>> can be improved significantly. Detailed information is in Patch#1.
>>
>> Patch#2 renames AmdSevIoMmu.* to CcIoMmu.* because these 2 files
>> support both SEV and TDX guest.
>>
>> Patch#3 is provided by Tom Lendacky which add SEV support for reserved
>> shared memory.
>>
>> Patch#4 updates the related section in Maintainers.txt.
>>
>> Code: https://github.com/mxu9/edk2/tree/IoMmu.v3
>>
>> v3 changes:
>>   - Check mReservedSharedMemSupported in
>> IoMmuReleaseReservedSharedMem
>>     before release the pre-allocated shared memory.
>>   - Delete a line of comment in Patch#3 which is suggested by Tom Lendacky.
>>
>> v2 changes:
>>   - Add Patch#3 which is provided by Tom Lendacky. It adds SEV support for
>>     reserved shared memory.
>>   - Add more description for mReservedMemRanges. It describes:
>>     1) How the pre-allocated memory is managed.
>>     2) What if the pre-allocated memory is used up.
>>
>> Cc: Erdem Aktas <erdemaktas@google.com>
>> Cc: James Bottomley <jejb@linux.ibm.com>
>> Cc: Jiewen Yao <jiewen.yao@intel.com>
>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>> Cc: Michael D Kinney <michael.d.kinney@intel.com>
>> Cc: Liming Gao <gaoliming@byosoft.com.cn>
>> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
>> Signed-off-by: Min Xu <min.m.xu@intel.com>
>>
>> Min M Xu (3):
>>    OvmfPkg/IoMmuDxe: Reserve shared memory region for DMA operation
>>    OvmfPkg/IoMmuDxe: Rename AmdSevIoMmu to CcIoMmu
>>    Maintainers: Update OvmfPkg/IoMmuDxe
>>
>> Tom Lendacky (1):
>>    OvmfPkg/IoMmuDxe: Add SEV support for reserved shared memory
>>
>>   Maintainers.txt                               |   2 +-
>>   OvmfPkg/IoMmuDxe/{AmdSevIoMmu.c => CcIoMmu.c} | 204 ++++----
>>   OvmfPkg/IoMmuDxe/{AmdSevIoMmu.h => CcIoMmu.h} |   0
>>   OvmfPkg/IoMmuDxe/IoMmuBuffer.c                | 495 ++++++++++++++++++
>>   OvmfPkg/IoMmuDxe/IoMmuDxe.c                   |   2 +-
>>   OvmfPkg/IoMmuDxe/IoMmuDxe.inf                 |   6 +-
>>   OvmfPkg/IoMmuDxe/IoMmuInternal.h              | 179 +++++++
>>   7 files changed, 781 insertions(+), 107 deletions(-)
>>   rename OvmfPkg/IoMmuDxe/{AmdSevIoMmu.c => CcIoMmu.c} (85%)
>>   rename OvmfPkg/IoMmuDxe/{AmdSevIoMmu.h => CcIoMmu.h} (100%)
>>   create mode 100644 OvmfPkg/IoMmuDxe/IoMmuBuffer.c
>>   create mode 100644 OvmfPkg/IoMmuDxe/IoMmuInternal.h
>>
>> --
>> 2.29.2.windows.2
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97524): https://edk2.groups.io/g/devel/message/97524
Mute This Topic: https://groups.io/mt/95683528/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V3 0/4] Reserve shared memory for DMA operation
Posted by Yao, Jiewen 1 year, 3 months ago
Merged https://github.com/tianocore/edk2/pull/3784

> -----Original Message-----
> From: Tom Lendacky <thomas.lendacky@amd.com>
> Sent: Saturday, December 17, 2022 10:18 PM
> To: Yao, Jiewen <jiewen.yao@intel.com>; Xu, Min M <min.m.xu@intel.com>;
> devel@edk2.groups.io
> Cc: Aktas, Erdem <erdemaktas@google.com>; James Bottomley
> <jejb@linux.ibm.com>; Gerd Hoffmann <kraxel@redhat.com>; Kinney,
> Michael D <michael.d.kinney@intel.com>; Gao, Liming
> <gaoliming@byosoft.com.cn>
> Subject: Re: [PATCH V3 0/4] Reserve shared memory for DMA operation
> 
> On 12/16/22 21:11, Yao, Jiewen wrote:
> > Hi Tom
> > Any further discussion?
> >
> > I would like to merge if no other feedback.
> 
> No other feedback from me. For the series:
> 
> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
> 
> >
> >> -----Original Message-----
> >> From: Xu, Min M <min.m.xu@intel.com>
> >> Sent: Thursday, December 15, 2022 1:18 PM
> >> To: devel@edk2.groups.io
> >> Cc: Xu, Min M <min.m.xu@intel.com>; Aktas, Erdem
> >> <erdemaktas@google.com>; James Bottomley <jejb@linux.ibm.com>; Yao,
> >> Jiewen <jiewen.yao@intel.com>; Gerd Hoffmann <kraxel@redhat.com>;
> >> Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
> >> <gaoliming@byosoft.com.cn>; Tom Lendacky
> <thomas.lendacky@amd.com>
> >> Subject: [PATCH V3 0/4] Reserve shared memory for DMA operation
> >>
> >> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4171
> >>
> >> This patch-set introduces the feature of reserving shared memory
> >> for DMA operation. Its intention is to reduce the allocation and
> >> conversion of private/shared memory, so that boot performance
> >> can be improved significantly. Detailed information is in Patch#1.
> >>
> >> Patch#2 renames AmdSevIoMmu.* to CcIoMmu.* because these 2 files
> >> support both SEV and TDX guest.
> >>
> >> Patch#3 is provided by Tom Lendacky which add SEV support for reserved
> >> shared memory.
> >>
> >> Patch#4 updates the related section in Maintainers.txt.
> >>
> >> Code: https://github.com/mxu9/edk2/tree/IoMmu.v3
> >>
> >> v3 changes:
> >>   - Check mReservedSharedMemSupported in
> >> IoMmuReleaseReservedSharedMem
> >>     before release the pre-allocated shared memory.
> >>   - Delete a line of comment in Patch#3 which is suggested by Tom
> Lendacky.
> >>
> >> v2 changes:
> >>   - Add Patch#3 which is provided by Tom Lendacky. It adds SEV support
> for
> >>     reserved shared memory.
> >>   - Add more description for mReservedMemRanges. It describes:
> >>     1) How the pre-allocated memory is managed.
> >>     2) What if the pre-allocated memory is used up.
> >>
> >> Cc: Erdem Aktas <erdemaktas@google.com>
> >> Cc: James Bottomley <jejb@linux.ibm.com>
> >> Cc: Jiewen Yao <jiewen.yao@intel.com>
> >> Cc: Gerd Hoffmann <kraxel@redhat.com>
> >> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> >> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> >> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
> >> Signed-off-by: Min Xu <min.m.xu@intel.com>
> >>
> >> Min M Xu (3):
> >>    OvmfPkg/IoMmuDxe: Reserve shared memory region for DMA
> operation
> >>    OvmfPkg/IoMmuDxe: Rename AmdSevIoMmu to CcIoMmu
> >>    Maintainers: Update OvmfPkg/IoMmuDxe
> >>
> >> Tom Lendacky (1):
> >>    OvmfPkg/IoMmuDxe: Add SEV support for reserved shared memory
> >>
> >>   Maintainers.txt                               |   2 +-
> >>   OvmfPkg/IoMmuDxe/{AmdSevIoMmu.c => CcIoMmu.c} | 204 ++++----
> >>   OvmfPkg/IoMmuDxe/{AmdSevIoMmu.h => CcIoMmu.h} |   0
> >>   OvmfPkg/IoMmuDxe/IoMmuBuffer.c                | 495
> ++++++++++++++++++
> >>   OvmfPkg/IoMmuDxe/IoMmuDxe.c                   |   2 +-
> >>   OvmfPkg/IoMmuDxe/IoMmuDxe.inf                 |   6 +-
> >>   OvmfPkg/IoMmuDxe/IoMmuInternal.h              | 179 +++++++
> >>   7 files changed, 781 insertions(+), 107 deletions(-)
> >>   rename OvmfPkg/IoMmuDxe/{AmdSevIoMmu.c => CcIoMmu.c} (85%)
> >>   rename OvmfPkg/IoMmuDxe/{AmdSevIoMmu.h => CcIoMmu.h} (100%)
> >>   create mode 100644 OvmfPkg/IoMmuDxe/IoMmuBuffer.c
> >>   create mode 100644 OvmfPkg/IoMmuDxe/IoMmuInternal.h
> >>
> >> --
> >> 2.29.2.windows.2
> >


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97525): https://edk2.groups.io/g/devel/message/97525
Mute This Topic: https://groups.io/mt/95683528/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-