[SeaBIOS] [PATCH v5 0/5] QEMU: Add capability to write back fw_cfg address to QEMU

ben@skyportsystems.com posted 5 patches 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/seabios tags/patchew/cover.1487621478.git.ben@skyportsystems.com
There is a newer version of this series
src/fw/paravirt.c       |  69 +++++++++++++++++++++++++++++
src/fw/paravirt.h       |   5 +++
src/fw/romfile_loader.c | 112 ++++++++++++++++++++++++++++++++++++++++--------
src/fw/romfile_loader.h |  65 ++++++++++++++++++----------
src/resume.c            |   4 ++
5 files changed, 215 insertions(+), 40 deletions(-)
[SeaBIOS] [PATCH v5 0/5] QEMU: Add capability to write back fw_cfg address to QEMU
Posted by ben@skyportsystems.com 7 years, 1 month ago
From: Ben Warren <ben@skyportsystems.com>

This patch set adds the capability to write to QEMU across the fw_cfg DMA
link.   It adds a higher-level command to write the BIOS-allocated address of
one fw_cfg file into an arbitrary point within another, writeable fw_cfg file
across the above-mentioned link.

The initial use case is for Windows VM
Generation ID, where QEMU needs to change the contents of fw_cfg
data at runtime, while still having BIOS allocate and manage the memory.

The final corresponding QEMU patch can be found here:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg430490.html

v5->v6: - Rebased to top-of-tree
        - Minor refactoring and conditional execution based on code review

v4->v5: - Minor changes to range checking and data validation
        - Added code for replaying COMMAND_WRITE_POINTER commands on S3 resume

v3->v4: - Added a 'src_offset' field in the message so the pointer need not
          point to the beginning of the file.
        - Changed the command struct definitions from anonymous to named.

v2->v3: - fixed up the qemu_cfg_write* functions to allow writing to an
          arbitrary offset within the destination file. 
        - Changed function name to COMMAND_WRITE_POINTER and its functionality
          to not patch memory at all, but write back to a specified offset.
v1->v2: - separated patch into two functional units.
        - changed so writes only occur over the DMA interface.
        - fixed coding style.
        - removed change to romfile struct definition
          (removed new write_back method).

Ben Warren (5):
  QEMU DMA: Add DMA write capability
  romfile-loader: Switch to using named structs
  QEMU fw_cfg: Add command to write back address of file
  QEMU fw_cfg: Add functions for accessing files by key
  QEMU fw_cfg: Write fw_cfg back on S3 resume

 src/fw/paravirt.c       |  69 +++++++++++++++++++++++++++++
 src/fw/paravirt.h       |   5 +++
 src/fw/romfile_loader.c | 112 ++++++++++++++++++++++++++++++++++++++++--------
 src/fw/romfile_loader.h |  65 ++++++++++++++++++----------
 src/resume.c            |   4 ++
 5 files changed, 215 insertions(+), 40 deletions(-)

-- 
2.7.4


_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://www.coreboot.org/mailman/listinfo/seabios