Skip to content

OvmfPkg/XenBusDxe: Fix ExitBootServices handler to avoid allocation

Anthony PERARD xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11OvmfPkg/XenBusDxe: Fix missing \n in DEBUG messagesOvmfPkg/XenBusDxe/EventChannel.c OvmfPkg/XenBusDxe/XenStore.c+5 -41 reply
2/11OvmfPkg/XenBusDxe: Have XenStoreFindWatch take a pointerOvmfPkg/XenBusDxe/XenStore.c+11 -91 reply
3/11OvmfPkg/XenBusDxe: Rework watch events receptionOvmfPkg/XenBusDxe/XenStore.c+35 -901 reply
4/11OvmfPkg/XenBusDxe: Avoid Allocate in XenStoreVSPrintOvmfPkg/XenBusDxe/XenStore.c+9 -121 reply
5/11OvmfPkg/XenBusDxe: Construct paths without allocationOvmfPkg/XenBusDxe/XenStore.c+46 -322 replies
6/11OvmfPkg/XenBusDxe: Rework XenStoreProcessMessage to avoid allocating memoryOvmfPkg/XenBusDxe/XenStore.c+130 -1671 reply
7/11OvmfPkg/XenBusDxe: Use on stack buffer in internal functionsOvmfPkg/XenBusDxe/XenBus.c OvmfPkg/XenBusDxe/XenStore.c OvmfPkg/XenBusDxe/XenStore.h+95 -771 reply
8/11OvmfPkg/XenBus: Change XENBUS_PROTOCOL to not return allocated memoryOvmfPkg/Include/Protocol/XenBus.h OvmfPkg/XenBusDxe/XenStore.c OvmfPkg/XenBusDxe/XenStore.h +1 more+54 -731 reply
9/11OvmfPkg/XenBusDxe: Fix NotifyExitBoot to avoid Memory Allocation ServicesOvmfPkg/Include/Protocol/XenBus.h OvmfPkg/XenBusDxe/XenBus.c OvmfPkg/XenBusDxe/XenBusDxe.c +3 more+121 -44 replies
10/11OvmfPkg/XenPvBlkDxe: Use XenBusIo->RegisterExitCallbackOvmfPkg/XenPvBlkDxe/BlockFront.c OvmfPkg/XenPvBlkDxe/BlockFront.h OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.c+47 -60 replies
11/11OvmfPkg/XenBusDxe: Fix XenStoreWaitForEvent use during EBSOvmfPkg/XenBusDxe/XenBusDxe.c OvmfPkg/XenBusDxe/XenBusDxe.h OvmfPkg/XenBusDxe/XenStore.c+12 -40 replies

Reviews trailers per patch

7 of 11 patches have a Reviewed-by or Acked-by.

PatchLaszlo Ersek
1/11R-b
2/11R-b
3/11A-b
4/11R-b
5/11R-b
6/11A-b
7/11
8/11A-b
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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(-)
Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel