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));