From 9617cddb72649f563eef8114648140b8c5607a71 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Thu, 4 Feb 2021 11:39:38 -0800 Subject: pc: add parser for OVMF reset block OVMF is developing a mechanism for depositing a GUIDed table just below the known location of the reset vector. The table goes backwards in memory so all entries are of the form |len| Where is arbtrary size and type, is a uint16_t and describes the entire length of the entry from the beginning of the data to the end of the guid. The foot of the table is of this form and for this case describes the entire size of the table. The table foot GUID is defined by OVMF as 96b582de-1fb2-45f7-baea-a366c55a082d and if the table is present this GUID is just below the reset vector, 48 bytes before the end of the firmware file. Add a parser for the ovmf reset block which takes a copy of the block, if the table foot guid is found, minus the footer and a function for later traversal to return the data area of any specified GUIDs. Signed-off-by: James Bottomley Reviewed-by: Dr. David Alan Gilbert Message-Id: <20210204193939.16617-2-jejb@linux.ibm.com> Signed-off-by: Paolo Bonzini --- include/sysemu/sev.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sysemu') diff --git a/include/sysemu/sev.h b/include/sysemu/sev.h index 5c5a13c6ca..882e8a4fb1 100644 --- a/include/sysemu/sev.h +++ b/include/sysemu/sev.h @@ -16,6 +16,7 @@ #include "sysemu/kvm.h" +bool sev_enabled(void); int sev_kvm_init(ConfidentialGuestSupport *cgs, Error **errp); int sev_encrypt_flash(uint8_t *ptr, uint64_t len, Error **errp); int sev_inject_launch_secret(const char *hdr, const char *secret, -- cgit v1.2.3-55-g7522