[edk2-devel] [PATCH 00/11] OvmfPkg/XenBusDxe: Fix ExitBootServices handler to avoid allocation

Anthony PERARD posted 11 patches 4 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/edk2 tags/patchew/20190913145100.303433-1-anthony.perard@citrix.com
OvmfPkg/Include/Protocol/XenBus.h |  67 +++-
OvmfPkg/XenBusDxe/EventChannel.c  |   3 +-
OvmfPkg/XenBusDxe/XenBus.c        |  58 ++-
OvmfPkg/XenBusDxe/XenBusDxe.c     |  29 +-
OvmfPkg/XenBusDxe/XenBusDxe.h     |   3 +
OvmfPkg/XenBusDxe/XenStore.c      | 577 +++++++++++++-----------------
OvmfPkg/XenBusDxe/XenStore.h      |  44 ++-
OvmfPkg/XenPvBlkDxe/BlockFront.c  |  82 +++--
OvmfPkg/XenPvBlkDxe/BlockFront.h  |  12 +-
OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.c |   4 +-
10 files changed, 483 insertions(+), 396 deletions(-)
[edk2-devel] [PATCH 00/11] OvmfPkg/XenBusDxe: Fix ExitBootServices handler to avoid allocation
Posted by Anthony PERARD 4 years, 7 months ago
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2190

Patch series available in this git branch:
https://xenbits.xen.org/git-http/people/aperard/ovmf.git br.xenbusdxe-fix-exitbootservices-v1

Hi,

This patch series works toward removing usage of Memory Allocation Services in
XenBusDxe when ExitBootServices() is called by the next operating system.

Since that in order to reset a backend, communication needs to happened via
xenstore, this series focus mostly on getting rid of allocation in the xenstore
driver. There are still some left but that's in function that aren't needed after
EBS is called.

In some places (like XenStoreVSPrint), instead of allocating a buffer, the
buffer (4k) is on the stack.

Thanks,

Anthony PERARD (11):
  OvmfPkg/XenBusDxe: Fix missing \n in DEBUG messages
  OvmfPkg/XenBusDxe: Have XenStoreFindWatch take a pointer
  OvmfPkg/XenBusDxe: Rework watch events reception
  OvmfPkg/XenBusDxe: Avoid Allocate in XenStoreVSPrint
  OvmfPkg/XenBusDxe: Construct paths without allocation
  OvmfPkg/XenBusDxe: Rework XenStoreProcessMessage to avoid allocating
    memory
  OvmfPkg/XenBusDxe: Use on stack buffer in internal functions
  OvmfPkg/XenBus: Change XENBUS_PROTOCOL to not return allocated memory
  OvmfPkg/XenBusDxe: Fix NotifyExitBoot to avoid Memory Allocation
    Services
  OvmfPkg/XenPvBlkDxe: Use XenBusIo->RegisterExitCallback
  OvmfPkg/XenBusDxe: Fix XenStoreWaitForEvent use during EBS

 OvmfPkg/Include/Protocol/XenBus.h |  67 +++-
 OvmfPkg/XenBusDxe/EventChannel.c  |   3 +-
 OvmfPkg/XenBusDxe/XenBus.c        |  58 ++-
 OvmfPkg/XenBusDxe/XenBusDxe.c     |  29 +-
 OvmfPkg/XenBusDxe/XenBusDxe.h     |   3 +
 OvmfPkg/XenBusDxe/XenStore.c      | 577 +++++++++++++-----------------
 OvmfPkg/XenBusDxe/XenStore.h      |  44 ++-
 OvmfPkg/XenPvBlkDxe/BlockFront.c  |  82 +++--
 OvmfPkg/XenPvBlkDxe/BlockFront.h  |  12 +-
 OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.c |   4 +-
 10 files changed, 483 insertions(+), 396 deletions(-)

-- 
Anthony PERARD


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47208): https://edk2.groups.io/g/devel/message/47208
Mute This Topic: https://groups.io/mt/34128009/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-