[SeaBIOS] [PATCH 4/4] add guest hint fw_cfg override

Gerd Hoffmann posted 4 patches 1 week ago
[SeaBIOS] [PATCH 4/4] add guest hint fw_cfg override
Posted by Gerd Hoffmann 1 week ago
Add runtime fwcfg override for the guest hint.
Usage: qemu -fw_cfg name=etc/guest-hint,string=32

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 src/fw/paravirt.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c
index 001be7caf102..25b37647d299 100644
--- a/src/fw/paravirt.c
+++ b/src/fw/paravirt.c
@@ -720,6 +720,13 @@ void qemu_cfg_init(void)
         dprintf(1, "Moving pm_base to 0x%x\n", acpi_pm_base);
     }
 
+    // guest hint
+    char *hint = romfile_loadfile("etc/guest-hint", NULL);
+    if (hint && strcmp(hint, "32") == 0)
+        GuestHint = 32;
+    if (hint && strcmp(hint, "64") == 0)
+        GuestHint = 64;
+
     // serial console
     u16 nogfx = 0;
     qemu_cfg_read_entry(&nogfx, QEMU_CFG_NOGRAPHIC, sizeof(nogfx));
-- 
2.47.0

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org