Skip to content

VNVRAM persistent storage

Corey Bryant qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7vnvram: VNVRAM bdrv supportMakefile.objs vnvram.c vnvram.h+511 -04 replies
2/7vnvram: VNVRAM in-memory supportvnvram.c+195 -10 replies
3/7vnvram: VNVRAM bottom-half r/w scheduling supportvnvram.c+142 -00 replies
4/7vnvram: VNVRAM internal APIsvnvram.c vnvram.h+280 -00 replies
5/7vnvram: VNVRAM additional debug supportvnvram.c+94 -00 replies
6/7main: Initialize VNVRAMvl.c+6 -00 replies
7/7monitor: QMP/HMP support for retrieving VNVRAM detailshmp.c hmp.h monitor.c +3 more+199 -04 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 0/7] VNVRAM persistent storage

This patch series provides VNVRAM persistent storage support that QEMU can use internally. The initial target user will be a software vTPM 1.2 backend that needs to store keys in VNVRAM and be able to reboot/migrate and retain the keys.

This support uses QEMU's block driver to provide persistent storage by reading/writing VNVRAM data from/to a drive image. The VNVRAM drive image is provided with the -drive command line option just like any other drive image and the vnvram_create() API will find it.

The APIs allow for VNVRAM entries to be registered, one at a time, each with a maximum blob size. Entry blobs can then be read/written from/to an entry on the drive. Here's an example of usage:

VNVRAM *vnvram;
int errcode
const VNVRAMEntryName entry_name;
const char *blob_w = "blob data";
char *blob_r;
uint32_t blob_r_size;

vnvram = vnvram_create("drive-ide0-0-0", false, &errcode); strcpy((char *)entry_name, "first-entry"); vnvram_register_entry(vnvram, &entry_name, 1024); vnvram_write_entry(vnvram, &entry_name, (char *)blob_w, strlen(blob_w)+1); vnvram_read_entry(vnvram, &entry_name, &blob_r, &blob_r_size); vnvram_delete(vnvram);

Thanks,
Corey

Corey Bryant (7):
vnvram: VNVRAM bdrv support
vnvram: VNVRAM in-memory support
vnvram: VNVRAM bottom-half r/w scheduling support
vnvram: VNVRAM internal APIs
vnvram: VNVRAM additional debug support
main: Initialize VNVRAM
monitor: QMP/HMP support for retrieving VNVRAM details

 Makefile.objs    |    2 +
 hmp.c            |   32 ++
 hmp.h            |    1 +
 monitor.c        |    7 +
 qapi-schema.json |   47 ++
 qmp-commands.hx  |   41 ++
 vl.c             |    6 +
 vnvram.c         | 1254 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 vnvram.h         |   36 ++
 9 files changed, 1426 insertions(+), 0 deletions(-)
 create mode 100644 vnvram.c
 create mode 100644 vnvram.h